HACKER Q&A
📣 JPLeRouzic

Why most WordPress sites can't meet Google's speed and core web vitals?


I wonder why most Wordpress websites can't meet Google's requirements for a "healthy" website even when they look quite usable in real life. For example

https://www.rollingstone.com/

https://pagespeed.web.dev/analysis/https-www-rollingstone-com/adieds44wz?form_factor=mobile

For speed, it has 13/100. It failed at the core Web vitals assessment.

Most little websites based on obscure frameworks that I know do much better.

Any hints for the reasons it is so slow?


  👤 vgeek Accepted Answer ✓
CLS is probably from ads, even Google's own "responsive" Adsense ads will nuke your score there.

Both the text compression and JS issues are again related to ads, since in many cases the page loads, makes a request with user info, goes to an auction then returns the ad to be shown-- and with multiple ads on the page, this ends up impacting both FCP and LCP.

If they removed all ads, they would probably be at an 80+ performance score?


👤 polalavik
Just ran my site - https://signalprocessingjobs.com - through pagespeed and it looks great. I run my site with hugo + netlify for $0.

I find the web tech world to be so unreasonably convoluted and bloated. it boggles my brain why wordpress is considered "easy" and some sort of de-facto standard. It barely makes any sense to me. It seems like some sort of 2005-2013 tech that you glue together with other 2005-2013 era tech and scaffolding. Wondering if others feel the same or if my lack of web-dev skills makes it seem like that?


👤 theandrewbailey
Looks like shifting layout really kills the score on this example, along with uncompressed and inefficiently compressed resources (both text and images). Are these things not prioritized by Wordpress, or are the people using them don't know or care?

👤 mattbgates
Even on a fast server running on OpenLiteSpeed completely cached, and loads instantly on a browser, my website on WordPress has failed Google. Must be some very strict requirements and the structure of WordPress isn't updated to handle it.

👤 BjoernKW
At 80/100, my WordPress-powered website does pretty well: https://pagespeed.web.dev/analysis/https-bjoernkw-com/dbmpsi...

Locally, using Lighthouse, I even get 98/100.


👤 dazc
rollingstone.com is powered by 'Wordpress.com VIP' so is maybe not a great advert for this service?

You do, however, find a lot of big business sites fail hugely on things like pagespeed and CLS for the simple reason that they are not heavily dependent upon Google search results so, consequently, don't feel compelled to jump through every hoop required.

With wordpress specifically, lots of folks use ready-made themes/templates which are often optimized for aesthetics rather than current performance metrics.


👤 easyThrowaway
Fixing this issue is basically 90% of my day job, I'll try to summarize the issue:

- The way wordpress theme "templating" (i.e., raw PHP) works it makes very difficult to get a complete overview of the layout issues arising from a full layout even without taking into consideration plugins and extras;

- jquery is the defacto JS framework of wordpress. Until a few weeks ago, it was included without minification. there are also a bunch of compatibility shims that are shipped with wordpress and it's somewhat common for a plugin to enable and include them even if they're not needed.

- You have basically no guarantees on which javascript libraries versions are available at runtime, so plugins tend to include every dependency you need. there's a somewhat primitive redundacy check for common libraries like jquery, but it's very inconsistent.

- It's very common for a stock wordpress theme to use the Bootstrap framework. It's usually the whole package + extras, going for roughly 300kb compressed.

- Wordpress makes heavy usage of url rewriting and aliasing internally for image and url resolution. One wrong setting in nginx or apache and any GET request could stall your web server for half a second or more.

- DB Access is extremely slow due to some architectural choices. If your website is relatively static a decent caching plugin can help but it becomes useless if your content changes very frequently.

- Due to the way classic themes work it's basically impossible in a normal setup to generate a critical CSS path for frequently accessed or above-the-fold resources. The new "Block Themes" philosophy should somewhat fix the issue once they're more commonly available.

- I know I'm sorta generalizing but... the general attitude around the WP developer scene outside the core devs is to prefer the "quick and dirty solutions" over something more organized, so there's very little, if any, attention to performance details. There's quite a lot of inertia into using relatively modern (anything past 2010, really) development paradigms and philosophies. The stereotypical WP dev I've met has learned the basics of PHP in 2006, decided it was good enough, and never really improved from that.