TL;DR
- Shopify stores carry a median 251 KB of unused JavaScript per mobile page (Web Almanac 2025)
- Only 48% of Shopify stores pass Mobile Core Web Vitals (pagespeedmatters.com)
- Typical manual cleanup time: 3–5 hours per store
- With automation (e.g. GhostCode): under 3 minutes
- Expected conversion lift: 2–6% = €10k–€30k/year on a €500k store
Why theme cleanup matters
Every 100ms of additional load time costs up to 7% of mobile conversion (Akamai study, 10 billion user visits). Shopify stores are hit hard: the platform code plus 6.4 active apps on average plus ghost code from uninstalled apps quickly sums to multiple MBs.
Below the 12 most concrete cleanup points, prioritized by impact.
The 12 steps
1. Search theme.liquid
Look in layout/theme.liquid for script tags from apps you no longer use: judge.me, klaviyo, bold, loox, yotpo, privy. You'll typically find <script src="//cdn.xyz.com/..."> entries safe to remove.
2. Check settings_data.json
This is where Shopify Online Store 2.0 stores app blocks. Dead entries sometimes break the theme editor. Warning: Never edit manually without backup — a syntax error destroys the JSON and the editor won't open.
3. Walk through snippets/
Orphan snippets like klaviyo-signup.liquid, bold-upsell.liquid — usually without {% render %} anywhere. Find via shop-wide search for snippet name: 0 hits = delete.
4. Clean sections/
Page builders like PageFly, Shogun, GemPages leave dozens of section files. Without template assignment they're dead weight.
5. assets/ folder
JavaScript bundles like bold.min.js (47 KB), loox.js (18 KB), klaviyo.js — still loading even though the app is gone. Biggest single speed lever.
6. locales/de.json / en.json
Translation keys used only by uninstalled apps increase payload on every page load.
7. Tracking pixels
Meta Pixel, TikTok Pixel, GTM with app-specific config often still fire after uninstall. Important: Check event attribution before removing.
8. Competing apps
Had both Judge.me AND Loox installed? Today you have both scripts in the theme. Clear cleanup case.
9. Old theme versions
The theme library often has 5+ predecessor versions. No performance impact, but clutter. After 90 days unused: delete.
10. CDN references
External script tags from unknown sources are a supply chain risk. Example: the Polyfill.io attack in 2024 compromised 384,773 hosts — many had old script tags.
11. Lighthouse before & after
No measurement, no proof. Run https://pagespeed.web.dev/, note LCP/INP/CLS, do cleanup, re-measure.
12. Theme backup before EVERY cleanup
Shopify admin → Themes → Actions → Duplicate. Always. No exception.
Automation: what GhostCode does here
An app like GhostCode combines points 1-8 + 12 automatically:
- 200+ app patterns detected
- 50+ CDN signatures identified
- Automatic theme backup before every change (90-day retention)
- Bulk cleanup or selective per finding
- Live Health Score 0-100
- Shopify Asset API exemption officially granted — prerequisite for safe theme writes
Effort: 30-second scan + 1-click cleanup. Instead of 3-5 hours manually.
What happens after cleanup?
Typical improvements within 7 days:
- LCP −0.5 to −1.5 seconds
- JavaScript payload −15% to −40%
- Theme editor stable again (settings_data.json without dead blocks)
- CWV status "Fails" → "Good" for 30-40% of stores
Next steps
- Today: Run Lighthouse, note baseline
- This week: Manual mini-cleanup (points 1-5) or install GhostCode free
- Then: Re-audit, document results
Further reading: Ghost Code — The Invisible Speed Killer · Shop Slow After Uninstalling Apps · App Uninstalled — Remove Code