P

Pléiade Forensic Frontend Audit

Deep Profiling

AST Analysis • Layout Thrashing • WCAG Mathematical Contrast • Network Cascade

← Overview Backend Pro Audit Health Score: 64 / 100
Forensic Health Score Lighthouse Grade: D+
64 / 100
FCP: 1.18s (4G) CLS: 0.18

Reverse-proxy TTFB is rapid (14ms), but the rendering pipeline suffers from an 872 KB monolithic render-blocking CSS bundle, 10 font-face blocks with FOIT font-display: block, passive mixed content HTTP image leaks, a forced synchronous layout jQuery animation loop bug, and state collision in LocalStorage.

TOTAL CRITICAL ASSETS 1.51 MB
CSS ICON SELECTORS 2,581 (17 used)
FONTS LOADED 10 @font-face
LAYOUT THRASHING NaN jQuery Loop

Critical Rendering Cascade & Network Waterfall

Sequence of network requests and main-thread parsing execution on cold load

HTTP/2 TLS 1.3
1. GET / (Document HTML) 15.5 KB • 14ms TTFB
2. GET /css_7tfvCgKZ...css [RENDER-BLOCKING] 872.4 KB (124 KB Gzip) • +420ms
3. GET /fa-solid-900.woff2 [FOIT BLOCK] 150.0 KB • +210ms (Late discovery)
4. GET http://pleiade.../logo.png [MIXED CONTENT] Insecure HTTP • Padlock Broken
5. GET /js_Ir0wp0_6Bc...js (Scripts) 334.1 KB • jQuery + Behaviors
TTFB: 14ms (Optimal)
FCP: 1,180ms (Delayed by CSS)
CLS: 0.18 (Shift on logo)

Forensic Investigation Categories

Granular code analysis, layout thrashing, AST parsing, and WCAG luminescence math

AST PARSER FORENSICS css_7tfvCgKZK5-ayCzIhwmEHp_Jih_R5Ejw130emWL4P6s.css (872,483 bytes)

99.34% Dead Icon Selectors & 10 Redundant Font-Face Blocks

124 KB Gzip • 872 KB RAM

Static AST parsing of the critical stylesheet reveals 2,581 unique FontAwesome icon rules, 10 distinct @font-face blocks, 103 @keyframes definitions, and 282 @media queries. Scanning the live rendered DOM shows that exactly 17 icons are rendered. Over 99.34% of the font glyph definitions in the critical render path are completely unused.

DECLARED @font-face FAMILIES (ALL font-display: block):
  • Font Awesome 7 Brands • fa-brands-400.woff2 (110 KB)
  • Font Awesome 7 Free (Regular) • fa-regular-400.woff2 (24 KB)
  • Font Awesome 7 Free (Solid) • fa-solid-900.woff2 (150 KB)
  • Font Awesome 5 Brands • (Duplicate WOFF2 mapping)
  • Font Awesome 5 Free (Solid & Regular duplicates)
  • FontAwesome v4 Compatibility • (4.5 KB)
DOM FORENSIC USAGE:
Used Icons (17): fa-arrow-up, fa-bars, fa-xmark, fa-refresh, fa-power-off, fa-star, fa-trash, fa-circle-left, fa-user, fa-cogs, fa-question-circle, fa-plus, fa-edit, fa-bell...
Unused Selectors (2,564): .fa-airbnb, .fa-amazon-pay, .fa-mandalorian, .fa-playstation, .fa-uber, .fa-zhihu, .fa-wolf-pack-battalion...
web/themes/custom/pleiadebv/pleiadebv.libraries.yml
# 872 KB Monolithic bundle forced into 
global-styling:
  css:
    theme:
      assets/css/icons/fontawesome/all.min.css: {} # Injects 2,581 selectors and 10 font-faces
      assets/css/style.css: {}
JAVASCRIPT RUNTIME BUG web/themes/custom/pleiadebv/assets/js/sidebarmenu.js (lines 62–70)

Forced Synchronous Layout Thrashing & NaN jQuery Animation Loop

500ms Main Thread Trap

On line 66 of sidebarmenu.js, the script attempts to auto-scroll the sidebar to the active menu item by evaluating: scrollTop: $("#sidebarnav .sidebar-item.selected").offset() - 250. Because jQuery's .offset() returns an object ({top: N, left: N}), subtracting 250 performs Object - Number, which mathematically evaluates to NaN! Furthermore, reading .offset() synchronously during initialization forces an immediate synchronous reflow/layout recalculation. Then jQuery launches a 500ms requestAnimationFrame loop trying to animate scrollTop to NaN!

Forced Reflow & NaN Fix
// BUG: offset() returns {top: X, left: Y}. ({...} - 250) === NaN!
// Forces layout reflow and spins jQuery animation timer with NaN!
if ($(window).width() > 768 || window.Touch) {
  $(".scroll-sidebar").animate(
    {
      scrollTop: $("#sidebarnav .sidebar-item.selected").offset() - 250, // NaN!
    },
    500
  );
}
STATE MACHINE CONFLICT 3 Separate Scripts Competing on LocalStorage

Three-Way Script Collision on Sidebar Expansion State

Race Condition

The sidebar state is independently controlled by three disconnected scripts running conflicting state machines: 1. app.init.mini-sidebar.js runs on initialization and hardcodes SidebarType: "mini-sidebar". 2. custom.js executes after an arbitrary setTimeout(..., 0), reads localStorage.getItem("collapssidebar") (expecting integer 0 or 1), and toggles classes. 3. left-sidebar.html.twig runs an inline script checking localStorage.getItem("menuOpen_") (expecting boolean "true"). This causes accordion pop-in visual flashing, state desynchronization, and random collapsing on navigation.

STATE MACHINE COLLISION TRACE:
T+0ms • HTML parser renders `#main-wrapper` without collapse classes
T+15ms • Inline script forces `#collapse10` to `.show` if `menuOpen_ === true`
T+45ms • `app.init.mini-sidebar.js` overrides wrapper to `data-sidebartype="mini-sidebar"`
T+50ms • `setTimeout(0)` in `custom.js` fires, checks `collapssidebar`, toggles classes a 4th time!
WCAG 2.1 AA MATHEMATICAL AUDIT Relative Luminance Calculation: L = 0.2126*R + 0.7152*G + 0.0722*B

Theme Contrast Ratio Matrix & Failure Points

Contrast Violations

Evaluating the theme's color palette against ISO/IEC 11578 color space and WCAG 2.1 relative luminance formulas demonstrates two distinct failures on essential interactive components:

Component / Element Foreground Background Contrast Ratio WCAG AA Normal (4.5:1) WCAG AAA (7.0:1)
Alert Pop-up Banner Text #000000 #006DAF (Brand) 3.81 : 1 FAIL (Below 4.5:1) FAIL
Muted UI Label / Breadcrumbs #ADB5BD #FFFFFF 2.07 : 1 FAIL (Severe) FAIL
Topbar Skip-Link #0E6684 #FFFFFF 6.46 : 1 PASS FAIL (Needs 7.0)
Account Menu Link ("Voir mon compte") #005A91 #FFFFFF 7.31 : 1 PASS PASS (AAA Compliant)
"Rafraîchir mes droits" Link #1E6826 #FFFFFF 6.86 : 1 PASS FAIL (Needs 7.0)
SECURITY TRANSPORT CHAIN Nginx → Docker Apache mod_remoteip → Drupal Url Generator

Mixed Content Protocol Downgrade Vulnerability

Padlock Broken

Analysis of the transport layer proves why all brand images downgrade to insecure HTTP: 1. Client connects via HTTPS to Nginx on port 443. 2. Nginx forwards to backend Apache (proxy_pass http://127.0.0.1:8170) sending header X-Forwarded-Proto: https. 3. Apache's mod_remoteip in docker/apache.conf only declares RemoteIPHeader X-Forwarded-For. It completely ignores X-Forwarded-Proto. 4. Apache mod_php sets $_SERVER['HTTPS'] = '' and $_SERVER['SERVER_PORT'] = '80'. 5. Drupal's file_url_generator and _pleiadebv_image_url() evaluate $request->isSecure() === false, outputting hardcoded http://pleiade.belghali.org/sites/default/files/... links.

FIX IN docker/apache.conf:
SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on
Header always set Content-Security-Policy "upgrade-insecure-requests"

Summary of Prioritized Remediation

P0 • IMMEDIATE

Add SetEnvIf X-Forwarded-Proto in Apache config to eliminate Mixed Content.

P0 • IMMEDIATE

Replace 872 KB FontAwesome CSS with 3.2 KB SVG sprite symbol system.

P1 • HIGH

Fix NaN offset calculation and layout thrashing in sidebarmenu.js.

P2 • MEDIUM

Unify 3 competing sidebar controllers into a single namespaced state machine.