- Choose an asset unloading plugin
- Use a lightweight page builder (or none)
- Use a smaller Google Analytics tracking code
- Disable jQuery
- Disable unused plugin modules
- Disable Cloudflare email obfuscation
- Disable WooCommerce scripts on non-eCommerce content
- Avoid multiple reCAPTCHAs
- Test Cloudflare Rocket Loader
- Is it jQuery?
2. Choose an asset unloading plugin
Step 1: Install Asset CleanUp Or Perfmatters
I prefer Perfmatters over Asset CleanUp because it lets you disable plugins everywhere except pages and posts, and because Asset CleanUp only lets you disable plugins everywhere except pages. Perfmatters is also known for being user-friendly.
Step 2: Enable Test Mode If Using Asset CleanUp
Step 3: Enable The Script Manager If Using Perfmatters
4. Use a lightweight page builder (or none)
Page builders have gotten a bad rep since core web vitals.
There’s a large trend of people replacing slow page builders (click thumbnails to enlarge):
If you don’t want to completely remove your page builder, try hard coding your menu, header, footer, and blog sidebar in CSS instead of relying on a page builder or plugin. CSS is much faster!
These can usually be done in your cache plugin.
Lazy loading advertisements (i.e. AdSense) and establishing earlier connections using preconnect and prefetch can significantly improve your page’s initial load time. Check your third-party code in PageSpeed Insights and try to limit it, or at least optimize it. Social sharing buttons and embedded YouTube videos (and social widgets) are also types of third-party code.
How To Optimize Third-Party Code
- Maps – only load Maps on contact/local pages.
- YouTube – lazy load embedded videos and replace iframe with preview image.
- Fonts – limit fonts, weights, icons, host them locally, and try preloading them.
- Analytics – host locally and use a smaller tracking code (analytics.js or minimal).
- Advertisements – avoid if possible, reserve space to avoid layout shifts, lazy load.
- Social Networks – usually from heavy social sharing plugins or embedded widgets.
- Gravatars – use a local Avatar plugin to serve local Avatar images and delay them.
Prefetching third-party scripts can reduce DNS lookup times. You can do this in WP Rocket, Perfmatters, Pre* Party, and other speed plugins. View which third-party code is loaded on your site, grab their hostnames, and prefetch them. Luke has a list of common domains to prefetch.
I did this with comments (wpdiscuz and Gravatars) so my comments don’t load immediately. Since some of my articles have hundreds of comments, this made my posts load much faster.
9. Use a smaller Google Analytics tracking code
Some Google Analytics scripts are larger than others.
Larger scripts collect more data for you to view in Google Analytics, but you may not even be using that data in the first place. If you only need basic data (page views, users, locations, devices, traffic sources, and real-time), you can use the minimal option. If you need more data in Google Analytics, you can use a large script type, but it will also slightly add to your load time.
- analytics.js – 18.4 KB
- minimal – 1.5 KB
- gtag.js v4 – 51.5 KB
Perfmatters, for example, lets you choose your Google Analytics script type and whether you want to disable GA’s Display Features which prevents a second HTTP request to DoubleClick.
10. Disable jQuery
Many themes and plugins use jQuery, so be careful when disabling it.
It may be possible to disable certain parts of jQuery (e.g. jquery-migrate) without it breaking your site. Test it in Perfmatters or Asset CleanUp and see if you can at least remove a few KBs.
11. Disable unused plugin modules
Many plugins are module-based and let you disable individual features you don’t use.
You can do this in JetPack, Ultimate Add-Ons, Rank Math, Yoast, and other module-based plugins. If you’re not using Rank Math’s analysis, disable it. Same concept with other modules.
12. Disable Cloudflare email obfuscation
13. Disable WooCommerce scripts on non-eCommerce content
WooCommerce loads extra scripts and styles across your site (even on non-product pages).
The easiest way to disable these is in Perfmatters. Cart fragments update the cart total without refreshing the page, but can sometimes add a few extra seconds to your load time. Choose which options you want to disable and whether speed or cart fragments are more important.
14. Avoid multiple reCAPTCHAs
15. Test Cloudflare Rocket Loader
If your visitors are local, you may not want to use a CDN at all and choose a host with a data center close to your visitor’s location. Otherwise, CDNs can often do more harm than good.
Even if some plugins don’t appear in your GTmetrix Waterfall report, that doesn’t mean they’re not slowing down your site. For example, plugins that collect ongoing data (backups, statistics, broken link checker) can slow down your site even though they’re not running on the frontend.
Retest Your Website
Frequently Asked Questions
Avoid heavy page builders and use an asset unloading plugin such as Perfmatters or Asset Cleanup to disable scripts on pages/posts where they don't need to load. Also try reducing the amount of third-party code loaded on your site.
See Also: My WordPress Speed Guide