If you have run a performance audit on your website and seen a warning about unused code or unused JavaScript, you would be forgiven for having no idea what that means or why it matters. It is one of those findings that sounds technical but is actually straightforward once you understand what is happening.
The short version is this: your website is loading files that it does not need, and those files are slowing it down. Here is a plain English explanation of how that happens and what can be done about it.
What unused code actually is
Every website is built from files. Some contain the content and structure of your pages. Others contain styling instructions that control how things look. And others contain code that makes things interactive, like dropdown menus, forms, or tracking scripts.
When a visitor loads your page, their browser has to download all of these files before it can display everything correctly. The problem is that many websites load entire files even when they only use a small part of them. The rest of the code sits there, downloaded but never used, adding to the time it takes for your page to appear.
A common example is a plugin or widget that comes with a large library of features. Your page might only use one or two of those features, but the whole library gets loaded anyway because it was included as a package and nobody trimmed it down.
Why it ends up there in the first place
Unused code is almost never added deliberately. It usually arrives in one of a few ways.
- Third-party tools and plugins: When you add something like a booking widget, a live chat tool, or a pop-up form, those tools often bring their own code libraries with them. Those libraries are designed to cover all possible uses, not just yours.
- Templates and themes: If your site was built on a theme or template, it may include code for features you are not using, like sliders, shop functionality, or event calendars, because the theme was designed to be flexible.
- Old scripts that were never removed: If you or a developer tried a tool at some point and later stopped using it, the code for that tool may still be loading on every page visit, silently taking up space.
How much does it actually matter?
It depends on how much unused code there is and how large the files are. A small amount of unused styling code might add a fraction of a second to your load time. A large unused JavaScript library could add a full second or more, which is meaningful when visitors on mobile connections are making split-second decisions about whether to wait or go back.
Google also uses load speed as one of the signals it considers when ranking pages in search results. So unused code can indirectly affect how visible your site is to people searching for businesses like yours.
What to do about it
If the amount flagged is small, it may not be urgent. But if it is more significant, the fix usually involves either removing the tool or script that is causing it, or having a developer configure the site to only load the parts of that code that are actually needed. For a site built on a theme or platform, there are often settings or plugins that can help with this without needing to touch the code directly.
The first step is knowing what is causing it. A free scan will tell you specifically which files are the issue and how much of a difference fixing them is likely to make.
If you want to see exactly what is slowing your page down and how much room for improvement there is, run a free scan below.
Find out what is slowing your page down
Run a free scan and get a plain English performance breakdown, including any unused code flagged and how much it is affecting your load time. Instant, no sign-up needed.
Scan my page for free →