Why is WordPress slow?
WordPress sites become slower when plugins or the theme create PHP errors. These errors will not show up on speed reports but can be identified and fixed after running a speed audit. Plugin/theme errors can slow down even fast sites and happen over time or after plugin/theme updates.
If you run Google Ads you may have received a message like this:"Thank you for contacting Google Ads Support. I can't see any policy violations either, however, I did check your ads and saw that the page speed for mobile users is very low. This can lead to such a rejection, so if you want to prevent the policy violation then I would recommend you to contact your webmaster to improve that accordingly.
What this means is that your ads are not running due to policy violation related to the slow speed. To fix it, you can simply fix the overall WordPress speed.
As a general rule, and regardless of the hosting package every WordPress site has a speed potential of 90+ (on mobile phones - GPI metrics).
Here are more reasons that may act on reducing your WordPress speed:
(Lack of) Server Optimization/Caching
Unregulated server caching and limited hosting resources can block higher speeds. Lack of server optimization and caching may reduce your speed potential from 1.5s to 4s. Most of the time, managed hosting does not have enough opportunities to optimize the server as it cuts down the access to advanced hosting settings contrary to a full Cpanel. To tweak server settings I need a full cPanel or Plesk hosting package.
PHP Errors from Theme and Plugins
PHP errors from theme and plugins may slow down the site as they generate long queries that could run on a loop if not resolved. You may check for these types of errors via the Query Monitor plugin.
To fix them you need to contact an experienced PHP developer. I fix the PHP errors on all my speed projects. If something delays the page rendering on the back-end or front-end, it is imperative to eliminate the speed blocker.
Τhese errors affect UX (template in mobile or desktop view) and performance (sites with UX errors get low grades on speed reports). Most templates in the market and those custom-coded, are not mobile optimized despite beinge advertised as such.
A mobile-friendly template is not only one that is responsive but primarily one without code bloat that yields fast performance and swift user interactivity (i.e. the metric Time to Interactive (TTI) on GPI). Themes like that are almost impossible to find that's why I create them from scratch (i.e. Custom WP sites built and optimized for speed: https://howtofinancemoney.com, >https://rochesterguitarlessons.com, >https://www.advokat-teigstad.no, https://www.erstatning.no, https://www.foreldretvist.no, https://teranova.com.au/)
An additional speed blocker is all the CSS/JS files offered or used by the theme and plugins; Such files don't abide by modern speed guidelines as they are not compressed nor grouped, they are bloated with CSS classes and JS modules that are not used on the page (i.e. the Unused CSS and JS issues on GPI reports) and their load timing are wrong, they block content elements from loading first (i.e. render-blocking resources).
The CSS/JS files needed to be cleaned from the bloat (CSS purifying), merged into a handful of files and put a rule to defer those CSS files that don't affect the visual representation of the site (they need to load at a second stage thus not being render-blocking). The same process needs to be done for the JS files, with an emphasis on those that don't cripple the site functionality and UX (menus, cart, sliders, etc.).
Too many and Un-managed Font Libraries
The current development practices load the fonts from online repositories (repos) like the Google fonts pulled from fonts.googleapis.com and fonts.gstatic.com. The two Google repos are not fast enough and the external fonts pulled from the theme, plugins, and page builders end up slowing down Wordpress sites. All font libraries should be served locally merged and, if necessary, preloaded.
It happens that the theme and page builders may load more fonts that remain unused, so cleanup is needed here, to limit the number of font libraries.
Un-optimized images create LCP errors. I have developed a technique to reduce the file size of images up to 78% (lossless compression), not found elsewhere. Freelancers either shrink the images via WP plugins e.g., Imagify, Smush, or online services that destroy the visuals. My technique is 100% manual (two-stage processing). Plus, I offer different image versions depending on the device to maximize speed and better UX (webp format for GPI, jpg/png for iOS, smaller dimensions for mobile devices).
Defer external scripts pulled on the page
External scripts like trackers, Facebook scripts, SUMO scripts, etc., delay page rendering. Since those scripts add to website functionality, the solution is to defer them so they load after the content elements. The bottom line is to keep the functionality and tracking and at the same time have a fast website.
Speed up the Wordpress back-end
This item is somewhat unconventional because most speed optimizers don't care about the back-end and they do nothing to speed it up. I believe that a site should have a fast frontend, backend, and database.