25 External Script Optimizations to make in WordPress (2019)

25 External Script Optimizations to make in WordPress (2019)

Are external scripts slowing down your WordPress site?

These are anything that pull information from outside your website: Google Fonts, Analytics, embedded YouTube videos, job postings, Gravatars, even comment and social sharing plugins.

You can optimize external scripts in WordPress by hosting files locally (fonts, analytics, Facebook Pixel), selectively disabling scripts using the Asset CleanUp plugin, and adding browser hints like preconnect and prefetch. Some plugins and scripts (eg AdSense) should generally be avoided if speed is important to you. Whatever is left over, determine whether the sacrifice in performance is worth it, and whether you should delete it or find an alternative.

External scripts almost always show errors in GTmetrix under Reduce DNS Lookups:

Here’s how to optimize third party scripts:


1. Find External Scripts

Run your website through GTmetrix (the tool I recommend) and look at your PageSpeed and YSlow tab. If you expand items and see the same external script (or plugin) showing multiple times throughout your report, that probably means it’s slowing down your WordPress site. You can also use the GTmetrix Waterfall tab to find out how long each resource takes to load.

WordPress External Scripts

Query Monitor
Query Monitor lets you see your slowest loading scripts, styles, and plugins:

Query Monitor Scripts

Query Monitor Slow Plugins


2. Disable Unused Scripts, Styles,



This article was written by Tom Dupuis and originally published on Tom Dupuis.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

Your email address will not be published. Required fields are marked *

Show Your ❤️ Love! Like Us
Scroll to Top