Skip to main content
All website issues
Speed

Your pages load code that never runs

What this means for your business

Your pages load JavaScript code that never runs. This still slows down your site for every visitor because the browser has to download and process it before anything else can happen. Think of it like making every customer walk through a storeroom to get to the shop floor.

How to fix it
Medium
1–3 hours

  1. 1Your page loads JavaScript files or bundles that contain code which is never actually executed on that page.
  2. 2Run your page through PageSpeed Insights (pagespeed.web.dev) — look for "Remove unused JavaScript" in the Opportunities section. It will list the specific files wasting the most bytes.
  3. 3Check whether any of those files belong to plugins or apps you no longer actively use. Removing unused plugins/apps is the quickest fix.
  4. 4If the files belong to tools you do use (like Google Analytics), ask your developer to load them with the defer attribute so they don't block page load.
  5. 5For custom JavaScript files, ask your developer to code-split the bundle — load only the code each page actually needs rather than the entire application at once.

On WordPress

Use the Asset CleanUp or Perfmatters plugin to disable specific scripts on pages that don't need them. For example, disabling WooCommerce scripts on non-shop pages can remove significant unused JavaScript.

On Shopify

Go through your installed apps and uninstall any you're not actively using — each app adds JavaScript even if you're not using its features. For scripts you keep, use the Shopify Theme Inspector to identify which ones are largest.

Pro tip: Installed-but-unused plugins and apps are almost always the main source of unused JavaScript. A site with 20 plugins is typically loading code for all 20 on every page, even pages that only use 3 of them.

Does your site have this problem?

SiteSprout scans your site, tells you which issues you actually have in plain English, and keeps watch so nothing breaks silently.

Scan your site free