- Use A Lightweight Page Builder (Or None)
- Use A Smaller Google Analytics Tracking Code
- Disable jQuery
- Disable Unused Modules In Plugins
- Disable Email Obfuscation From Cloudflare
- Disable WooCommerce Scripts On Unneeded Pages
- Avoid Multiple reCAPTCHAs
- Test Rocket Loader In Cloudflare
- Is it jQuery?
- Is it third-party services?
If scripts or plugins are loading across your site but only need to load on certain pages, you can disable them everywhere else.
Step 1: Install Asset CleanUp Or Perfmatters
I prefer Perfmatters over Asset CleanUp because it lets you disable plugins everywhere except pages and posts, while Asset CleanUp only lets you disable plugins everywhere except pages. Perfmatters is also known for being more user-friendly.
Step 2: Enable Test Mode If Using Asset CleanUp
3. Use A Lightweight Page Builder (Or None)
Check your source code and see how many time your page builder shows up.
These can usually be done in your cache plugin.
Lazy loading advertisements (e.g. 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.
- Maps – only load Maps on contact/local pages.
- YouTube – lazy loading embedded videos and replace iframe with preview image.
- Fonts – limit fonts, weights, icons, host them locally, and trying preloading them.
- Analytics – host locally and use a smaller tracking code size (analytics.js or minimal).
- Advertisements – avoid when possible, limits number of ad spaces, lazy load them.
- Facebook Pixel – host locally using the WP Rocket’s Facebook Pixel add-on setting.
- Social Networks – usually from heavy social sharing plugins or embedded widgets.
Prefetching third-party scripts can help reduce their load times. You can do this in WP Rocket, Perfmatters, and many other speed plugins. View which third-party code is loaded on your site, grab their hostnames, and prefetch them. Luke has a great 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 make my posts load much faster.
8. 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.
9. Disable jQuery
Many themes and plugins use jQuery, so be careful when testing this.
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.
10. Disable Unused Modules In Plugins
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, don’t enable it. Same with other modules.
11. Disable Email Obfuscation From Cloudflare
12. Disable WooCommerce Scripts On Unneeded Pages
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.
If you’re not using Perfmatters, there are quite a few solutions on GitHub.
13. Avoid Multiple reCAPTCHAs
14. Test Rocket Loader In Cloudflare
Cloudflare’s Rocket Loader can go both ways IMO.
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.
I hope this helped! Leave a comment if you have questions.