If your Shopify store has more than a few apps installed, there is a strong chance that scripts you no longer need, or no longer need everywhere, are slowing it down.
Many of these scripts load globally by default, even on pages where they serve no purpose.
Auditing and removing this bloat is one of the fastest and most reliable ways to improve load time and site performance.
This post will show you, step-by-step, how to perform a DIY Shopify site audit and cut your load time.
Script and app bloat on Shopify
Our latest speed benchmark of 1,000 Shopify stores found that fewer than half consistently pass Core Web Vitals thresholds! Scripts and apps are a big culprit in the performance drops.
Scripts and app bloat refer to the accumulation of unnecessary, globally loaded, or poorly scoped code on your website. Over time, especially if you do not continuously optimise, these ‘leftovers’ can start to slow your site down.
Here’s a breakdown for the non-tech-savvy readers.
- A script is a set of instructions written in JavaScript that instructs the browser on what to do. Some scripts are critical to the page loading; others are not. A typical example is a tracking script or marketing widget that unnecessarily loads on every page.
- App bloat refers to unnecessary apps or app code that contain scripts and unused resources, such as JavaScript, CSS, or images, that load on pages where they are not needed. Let’s say a product review app that loads everywhere on the site, not only on PDPs.
What you will learn
Identify, using testing tools, which scripts and snippets are slowing your website down, and remove unnecessary ones without causing errors when tested and scoped correctly.
We will learn how to:
- Identify which scripts actually run
- Understand when and where they execute
- Remove or scope them safely
What tools are we using?
The admin dashboard will not show us all we need. We will use a combination of native Shopify tools and your browser's built-in tools, namely Shopify Theme Inspector, Shopify Theme Editor, Lighthouse, and Network Waterfall.
The table below clarifies what each tool is used for.
| Tool | What it's used for | What it won't tell you |
|---|---|---|
| Shopify Theme Inspector | Finding slow Liquid files, snippets, and app-rendered theme code | JavaScript size, third-party scripts, or network timing |
| Shopify Theme Editor | Disabling app embeds and removing or editing theme code | Which scripts are slow or unnecessary |
| Lighthouse | Highlighting script/app bloat and estimating performance impact | Where a script is injected in the theme |
| Network Waterfall | Showing what scripts load, when they load, and what triggered them | Liquid rendering performance |
Your store does not host apps
In WordPress, you download a plugin and install the complete code on the page. Once deleted, the code is removed. With Shopify, it's different; You are not downloading the app directly in your store. Only the app's API (the connector between your site and app) is installed, and it allows the app to:
- Inject scripts
- Render blocks or snippets
- Call Shopify APIs
- Load assets from the app’s own servers
The app still lives outside of your store, but it may inject Liquid snippets, assets, or settings into your theme, while runtime scripts load externally. This means several things for your site’s performance and our tasks at hand in cleaning up residuals.
- Every app adds ‘runtime’ costs, even if it's lightweight: an app still downloads assets, parses JavaScript, and executes logic on page load, adding network latency.
- Scripts are usually loaded globally by default: an app script will generally load on all pages of your store, even if the function is not needed on those pages.
- Uninstalling apps doesn’t guarantee cleanup: when an app is uninstalled, its external services stop responding, but injected Liquid snippets, app embeds, script tags, or metafields may remain.
The three methods of cutting Shopify's load time
There are three practical ways to cut load time, whether apps are still installed or already deleted
1. Disable app embed
- The script comes from an app you still use (but don’t need everywhere)
- You’re not 100% sure what the code does, or
- Lighthouse shows vendor scripts, and you want a reversible change.
2. Remove snippet/script from theme code when
- The app is deleted, but its scripts still load (classic residue)
- DevTools “Initiator” points to theme.liquid, a snippet, or a section
- The code is clearly an old install block (comments, vendor domains, etc.)
3. Conditional loading when
- You need the app, but only on specific templates. This doesn’t always work; some apps require global availability and will break if loaded conditionally.
A good example is the Yotpo Reviews app from our earlier analysis. Conditionally loading it on product pages would be ideal. On its own, optimising only for one app is not a significant improvement. Repeating the same procedure for each one is part ofwhat we use to speed up our clients' websites.
Use Theme Inspector to audit Shopify performance.
Shopify apps often insert their own snippets into your theme files. Theme inspector is great for finding app snippets rendered in Liquid and pointing you to the theme file that’s slow. It won’t diagnose third-party JavaScript downloads or network bottlenecks.”
While we focus on script bloat, Theme Inspector helps rule out server-side Liquid bottlenecks before blaming JavaScript.
If you haven’t already, download the Shopify Theme Inspector for Chrome extension.
What you need to look for is
- “Which Liquid template/snippet/section is slow?”
- “Is a specific app snippet (rendered via Liquid) taking 300ms+ to render?”
- “Is the slowdown coming from server-side theme rendering, not JavaScript?”
Use Lighthouse to find 3rd-party script bloat.
Lighthouse is an open-source tool you can access directly from Google Chrome that analyses performance, accessibility, SEO, and best practices using lab data. It’s crucial to measure your overall site performance, as it’s the engine powering many online speed testing tools.
For our tasks at hand, Lighthouse is best for highlighting third-party script bloat and giving estimated savings and directional signals, but it won’t always tell you where that script is added in your theme.
Additionally, Lighthouse scores can fluctuate between runs and should be used as a diagnostic tool, not as a guarantee of real user performance gains.
1. Access Lighthouse from your website
You do not need to be a developer to access Lightouse. Right-click from Chrome and press ‘Inspect Element.’ From there, head to Lighthouse as instructed in the screenshots below.
Tip: Run Lighthouse in Incognito mode so that no browser extensions interfere

2. Analyse performance for desktop and mobile
We only need to analyse performance, as that is where loading issues are hidden. A few minutes of waiting will reveal your site’s score and the holdups.
3. Identify scripts and app bloat
Scrolling down the results to Insights and diagnostics, we see the names of apps and relevant code, as shown in the screenshot here. If the name of a specific app appears, it doesn’t mean you should/can delete or comment out the code immediately in the theme editor.

In this example, we can see:
- Yotpo flagged under unused CSS
- Klaviyo flagged under legacy JavaScript
- Additional warnings around unused JavaScript and JavaScript execution time
This is the starting point for further inspection. Think of it as a shortlist. It helps us identify which apps contribute to runtime weight and spot patterns of global loading. Only after understanding:
What the app does: Understand what the code does and whether removing it can break other functionalities
Where it’s needed: Determine whether the app is needed or not on a specific page
How it’s loaded: We need to understand when and how the scripts are loaded. Some apps require the scripts to be globally injected (run on every page), and we can’t remove the app functionality if it is not used on a specific page.
How will the apps I deleted appear?
You will typically find the following.
- Vendor script still loads, even though the feature is gone
- CSS/JS marked unused on pages where it shouldn’t load at all
- Third-party time is high for a vendor you don’t have installed anymore
Using Network Waterfall
The next tool we will use is Network Waterfall. As with Lighthouse, you can access it directly from your browser; unlike it, it tests your website based on network speed. Devs use it all the time to ensure websites load efficiently, even on slower networks.
Network waterfall is best for seeing every script request, spotting the biggest/slowest 3rd-party files, and confirming if a script loads on pages where it shouldn’t.

“Initiator" tells you who loaded the script. If Initiator points to:
- theme.liquid, snippet, or section, it’s likely safe to remove if the app is deleted
- App loader or vendor CDN, then check App Embeds or app settings
- Another third-party script removal must happen upstream, not in theme code
| What you see in Network | Initiator points to | App status | What to do | Why |
|---|---|---|---|---|
| Vendor script loads on every page | theme.liquid, snippet, or section | Remove snippet/script | Defer/delay | This is leftover code (ghost residue) still triggering requests |
| Vendor script loads globally | App loader / App Embed | App still installed | Disable App Embed | Safest, reversible way to stop global loading |
| Vendor script loads only on some pages | Theme condition or section | App still installed | Keep as is | Script is already scoped correctly |
| Vendor script loads globally but feature used only on PDPs or cart | Theme code or embed | App still installed | Conditional load | Reduces bloat without breaking functionality |
| Vendor script loads via another third party (GTM, consent tool) | Third-party loader | App may be deleted | Remove upstream loader | Removing theme code won’t stop it |
| Vendor script loads early and blocks rendering | Page → vendor script | App still installed | Defer / delay | Keeps feature while improving LCP |
How To Remove Unused Code
When you know which one to remove, duplicate your theme first. Then go to Online Store --> Themes --> Actions --> Edit Code, comment it out, test thoroughly, and only then remove it.
Tip: Always back up your theme before editing any code by duplicating it! You could be breaking other page functionalities without intending to.

1. Locate the code
From the Network Waterfall, copy the full Request URL or simply copy the URL from Lighthouse under “Reduce unused JS/CS.S” and search for that (or the vendor name) in the search bar.
That URL/domain is what you’ll hunt in the theme.

2. Comment the script out
In code, comment out first (so you can revert), test your storefront, then permanently delete the lines/snippet files only after everything works.
If it’s a Liquid render/snippet:
{% comment %}
{% render 'app-name' %}
{% endcomment %}
If it’s a script tag:
3. Save and test the website
You want to make sure everything on the website is working correctly before permanently deleting the line/snippet. If nothing is wrong, then proceed with deleting the code.
Here’s a general checklist of what to test on the site.
| What to test | Where to test | What you’re checking for |
|---|---|---|
| Homepage loads cleanly | Filters, sorting, infinite scroll, badges, and quick add still work | No broken layout, missing fonts/icons, or console errors |
| Collection page | any /collections/... | Analytics and tracking, including GA4 events, GTM containers, and conversion tracking, if relevant |
| Product page (PDP) | any /products/... | Reviews, ratings stars, loyalty widgets, upsells, ATC button work |
| Cart page | /cart | Cart drawer/page works, quantities update, discounts, shipping estimator |
| Checkout path (as far as you can go) | Add to cart → checkout | No missing shipping/payment steps, no blocked checkout button |
| Search | /search | Search results show correctly; no UI glitches |
| Account login | /account/login | Login works; no redirect loops |
| Chrome responsive mode/phone | wait 10–30s or trigger exit intent | Email capture, SMS forms, loyalty popups still appear (or don’t, if expected) |
| Analytics/tracking (if relevant) | DevTools → Network (filter vendor) | Vendor requests still fire if you intended to keep tracking |
| Network confirmation | DevTools → Network → JS | The removed script no longer loads on pages where it shouldn’t |
| Mobile check | Chrome responsive mode / phone | No layout shifts, tap targets work, performance didn’t regress |
Speed and conversions are two sides of the same coin
Small, meaningful improvements are what ultimately take your site to the level of each industry's top store. It's not only about speed, but your acquisition strategy will also suffer unless you constantly optimise site performance.
Google and today’s LLM tend to favor fast websites and may rank them higher or surface their content directly in conversations when performance reflects real user experience. On the other hand, there's a direct relation to conversion rate and speed performance that will always be relevant.
What we covered is only a piece of the puzzle. A direct call with our team of devs will help you further pinpoint what needs optimising and the impact it would make. Book a complementary call now and save yourself months of research and trial and error.