Why Your Shopify Theme's App Blocks Are Silently Killing Page Speed (And What To Do About It)
Why Your Shopify Theme's App Blocks Are Silently Killing Page Speed (And What To Do About It)
Most Shopify store owners we audit have the same blind spot. They uninstall an app, assume the problem is gone, and move on. What they do not realize is that the app's code is still sitting in their theme, loading on every single page, burning through render time and pulling down Core Web Vitals scores they worked hard to improve.
We see this pattern constantly on stores doing $2M to $15M in revenue. The team installed eight apps over two years, removed four of them, but the liquid snippets, JavaScript files, and stylesheet references are still embedded in the theme. Google is still loading that code. Customers are still waiting for it.
This is not a beginner mistake. It happens to sophisticated operators who are moving fast and trusting that Shopify's app uninstall process cleans up after itself. It does not.
What Actually Happens When You Uninstall a Shopify App
When you install an app on Shopify, especially one that modifies your storefront, it typically does two things. First, it injects code directly into your theme files, usually in the liquid templates, the theme.liquid layout file, or in dedicated snippet files. Second, it may add app blocks or app embeds through the theme editor.
When you uninstall the app, Shopify removes the app's access to your store and its data. It does not audit your theme and remove every line of code it inserted. That cleanup is supposed to happen automatically in newer app installations that use app blocks properly, but it is inconsistent, and for older apps or apps that took shortcuts during development, the code stays behind.
We audited a skincare brand last year running on a heavily customized Dawn theme. They had uninstalled a recently viewed products app, a size guide popup app, and a bundling app over the prior 18 months. All three had left JavaScript files loading in the head of every page. The combined payload was adding over 400ms to their time to interactive on mobile. Their Lighthouse score was sitting at 41. They had no idea why.
How To Find Orphaned App Code In Your Theme
The most direct method is a manual theme audit. Open your theme code editor in Shopify and start with theme.liquid. Look for script tags, stylesheet links, or render statements that reference app names, third party CDNs, or snippets you do not recognize.
Then check your snippets folder. Sort by date modified if you can, or just scan the list for files with names like bold-upsell.liquid, loox-reviews.liquid, or anything that obviously references a specific app. If the app is gone but the snippet is there, that file is likely still being called somewhere.
We also use PageSpeed Insights and WebPageTest waterfall views to catch this in audits. When we see a JavaScript file loading from a CDN domain that does not match any active app on the store, that is a dead giveaway. Tools like GTmetrix will show you every third party request firing on a page load, and orphaned app scripts show up clearly as requests with no corresponding active service.
For stores on 2.0 themes, check your template JSON files too. App blocks that were added through the theme editor sometimes leave empty block entries in the JSON even after the app is removed.
The Performance Cost Is More Than Just Load Time
Orphaned scripts do not just slow down the page load. They can cause JavaScript errors that silently break other functionality. We have seen stores where an uninstalled cart upsell app left behind a script that was attaching an event listener to the add to cart button. The app was gone, so the listener had nothing to connect to, and it was throwing a console error on every product page. That error was interrupting a downstream script from a loyalty app that was still active. The loyalty widget was not showing up for roughly 30% of sessions and nobody knew why until we traced the error chain.
Beyond broken functionality, there is the issue of third party tracking. Some apps load pixels or tracking scripts as part of their snippet code. When the app is uninstalled but the code remains, you may still be sending customer behavior data to a platform you no longer use or have a relationship with. That is a data privacy issue worth taking seriously, especially if you sell into the EU.
How We Handle This In Theme Audits
Our process for cleaning up a theme starts with a full inventory. We export the theme, do a text search across all files for known app identifiers, and cross reference that list against the store's currently installed apps. Anything that does not match gets flagged.
We then check each flagged item before deleting it. Some code that looks orphaned is actually part of a custom modification a developer built on top of an app's infrastructure. Deleting it without checking can break something real.
After cleanup, we test on a development theme using a combination of manual QA and Hotjar session recording to catch any visual regressions. Then we run PageSpeed Insights before and after on the homepage, a collection page, and a product page. The gains are usually material. On the skincare brand we mentioned earlier, cleaning up orphaned scripts moved their mobile Lighthouse score from 41 to 68 without touching a single line of their active code.
For ongoing prevention, we recommend a simple rule: before installing any app, create a duplicate of your live theme. After installing and testing the app, note exactly what files were modified. If you remove the app later, you have a reference point for what needs to come out.
Making This Part of Your Regular Store Maintenance
This kind of technical debt builds up fast on stores that are actively experimenting with apps, which is most stores doing real revenue. A quarterly theme audit takes a developer about two to three hours and consistently pays off in both performance and stability.
We also recommend using a tool like Shopify's built in theme check or a tool like Forsberg+two's Theme Inspector to get a read on your theme's overall health. These tools will not catch everything, but they surface obvious issues quickly.
The stores that compound their conversion rate improvements over time are the ones treating their theme like a codebase worth maintaining, not just a design template. Orphaned app code is one of the clearest examples of technical debt that directly costs revenue, because slower pages convert at lower rates, and the data on that relationship is not ambiguous.
If you are not sure what is hiding in your theme code or why your page speed scores have been drifting down despite no major changes, a conversion audit is a good place to start. We dig into exactly this kind of issue across the full store and give you a prioritized list of what to fix first.