Lighthouse on a WordPress site spits out 30+ recommendations the first time you run it. “Eliminate render-blocking resources.” “Defer offscreen images.” “Reduce unused JavaScript.” Half of them give 0.05-second improvements. A few give 1+ second improvements. The skill is identifying which is which, and not chasing every recommendation just because Lighthouse turned it red. Lighthouse is a lab metric — what matters is whether your real users see the improvement in CrUX.
What’s happening
Lighthouse simulates a Moto G4 on slow 4G with 4x CPU throttling. This is intentionally a slow profile to surface bottlenecks. The “Opportunities” section lists potential improvements ranked by estimated savings. The “Diagnostics” section lists things that may or may not affect performance. The scoring algorithm weighs LCP, INP (via TBT in lab mode), CLS, FCP, and SI. A score of 90+ is “good.” A score of 50-89 is “needs improvement.” Below 50 is “poor.” But scores on the same WordPress site can vary by 20+ points between runs — Lighthouse is noisy.
How to verify
Run Lighthouse from the command line for consistency:
npx lighthouse https://example.com/ --form-factor=mobile --throttling.cpuSlowdownMultiplier=4 --output=json --output-path=/tmp/lh-mobile.json
npx lighthouse https://example.com/ --form-factor=desktop --output=json --output-path=/tmp/lh-desktop.json
jq '.categories.performance.score, .audits.["largest-contentful-paint"].numericValue, .audits.["total-blocking-time"].numericValue, .audits.["cumulative-layout-shift"].numericValue' /tmp/lh-mobile.json
Run 3-5 times and take the median. Single Lighthouse runs are unreliable.
The fix — what to actually do
-
Look at Opportunities, ignore most Diagnostics. Opportunities show estimated time savings. Focus on items with savings > 500ms. Diagnostics are noisy and frequently misleading — “Avoid enormous network payloads” can flag a perfectly reasonable WordPress hero image.
-
The three opportunities that usually matter for WordPress.
- Eliminate render-blocking resources. WordPress themes commonly load 3-5 CSS files synchronously. Inline critical CSS, defer the rest. Plugins like Autoptimize or WP Rocket handle this — verify the result with a fresh Lighthouse run.
- Reduce unused JavaScript. Page builder themes (Elementor, Divi) load 200KB+ of JS used only on the editor side. Use Asset CleanUp or Perfmatters to dequeue scripts on the frontend pages that don’t need them.
- Properly size images. WordPress serves the original upload size by default if the theme doesn’t use
srcset. Verifysrcsetis present on the LCP image. If not, the theme needs fixing.
-
Score variance. Run Lighthouse three times. If scores vary by more than 10 points, your WordPress site has flaky performance — usually caused by uncached origin response, dynamic ads, or third-party script load order changes. Cache the page at the edge first, then re-measure.
-
The cache vs no-cache gap. Lighthouse runs once and ignores cache. Real users hit your site with primed cache after the first page view. The Lighthouse score reflects first-visit performance, which is the worst case. For ranking purposes, this is correct — Google’s crawlers see uncached pages. For UX, repeat-visit performance also matters.
-
Don’t optimize for Lighthouse score above all else. A score of 95 isn’t categorically better than 88 if the difference comes from over-aggressive defer attributes that break interactivity. The metrics matter; the composite score is approximate.
-
PageSpeed Insights vs raw Lighthouse. PageSpeed Insights runs Lighthouse but also shows CrUX field data when available. The “Field Data” section is the actual user experience; the “Lab Data” is Lighthouse. When they disagree (lab green, field amber), trust the field data for ranking decisions. Stack Harbor’s enterprise WordPress monitoring tracks both.
-
The third-party script problem. Lighthouse will list every third-party script. Most WordPress sites have 5-10: Google Analytics, Google Tag Manager, Facebook Pixel, chat widget, A/B testing tool, etc. Each adds 100-500ms. Audit quarterly — every script needs a current business justification.
-
Server response time (TTFB). Lighthouse flags slow TTFB (Time to First Byte). On WordPress, TTFB is determined by: PHP execution time, database query count, and whether full-page cache hits. If your TTFB is > 500ms on the home page, fix caching first — no amount of JS optimization will fix a slow origin.
-
Set a Lighthouse budget. In a CI pipeline, fail the build if the Lighthouse score drops below threshold. This catches regressions before deploy. Stack Harbor’s enterprise WordPress deploy pipelines include Lighthouse budgets per environment.
Stack Harbor handles WordPress performance audits as part of enterprise WordPress operations. Start the conversation when your WordPress Lighthouse score regressed and you don’t know which deploy caused it.