Platform Guide

Shopify Store Code Audit: Before You Fix or Rebuild

Inherited a messy Shopify store? Audit the theme code, ghost code, ScriptTags and access yourself — then decide fix vs rebuild, and what an audit costs.

Code AuditGhost CodeFix or RebuildSecurity
July 24, 2026·19 min read·

Key Insights in 60 Seconds

Skim the highlights, then jump to the section that matches the store you're trying to make sense of.

You can run the core of a code audit yourself, for free — from your Shopify admin, no coding required.
Uninstalling an app doesn't always remove its code — that leftover 'ghost code' is the first thing an audit hunts.
Legacy ScriptTags and checkout.liquid customizations expire — non-Plus stores hit the deadline on August 26, 2026.
Your theme's generation usually decides fix vs rebuild — a vintage, pre-2021 theme almost always means a rebuild.
A rebuild keeps your products, orders, and collections, but theme settings, code, and app tweaks don't carry over.
If you see changes you never made, treat it as a hack first — contact Shopify Support before touching any code.

What You'll Learn

1When your store needs a code audit
2What to check, layer by layer
3How to run the free DIY audit
4Whether to fix or rebuild
5How to triage a hacked store
6What an audit should cost

A popup you deleted months ago still flashes on mobile. A product page loads a review widget from an app you stopped paying for. Or you've just taken over a store — bought the business, or inherited it from an agency that's gone quiet — and you have no idea what's actually inside the theme. Nothing is on fire, but nothing feels safe to touch, either. That uncertainty is exactly what a Shopify store code audit resolves: it tells you what's in there before you decide to live with it, fix it, or start over.

Something's Off in a Store You Didn't Build

Key takeaway

The reassuring part is that finding out what's in there is completely safe. Reading your theme code, scanning your app list, and checking access in the admin changes nothing — the code editor only writes changes when you click Save, so you can look at everything without risk. A code audit is just a structured walk through each of those layers — theme code, leftover app residue, access, and the ageing checkout layers — to decide what to keep, fix, or rebuild.

One boundary worth setting up front: this is a code-and-health audit, not an SEO one. Duplicate URLs, canonicals, and crawl issues are a separate job — our guide to a Shopify technical SEO audit covers that side. And if you're buying a store rather than building one, treat the code as part of due diligence: acquisition guides stress confirming the source code is clean and transferable before you pay.

When You Actually Need One

You don't audit a store for fun — you do it when one of these is true. See which of the six situations below matches yours; most readers land on at least two.

You inherited or bought the store
You took over a working store and can't see what previous owners or their agencies built into the theme.
Your developer disappeared
The freelancer or agency who built it went quiet, and nobody documented what they changed.
You're doing acquisition due diligence
Before buying a store, you need to confirm the code is clean and transferable — not a liability you inherit.
Apps left a mess behind
You removed apps and now see leftover popups, broken sections, or a store that simply feels slower.
You suspect a compromise
You see redirects, content, or admin users you never set up. If that's you, jump to the hacked-store triage now.
You're planning a redesign
Before a re-theme or migration, you want to know what's worth carrying over and what to leave behind.

What's Hiding Inside the Theme

Key takeaway

An audit works in layers, from the code inside your theme outward to the apps and accounts around it. Start inside the theme, where three things tend to hide: an ageing architecture, leftover app code, and invisible scripts.

Which Theme Generation Are You On?

Every Shopify theme belongs to one of three generations, and which one you're on shapes the whole fix-versus-rebuild decision. Vintage themes use the original, pre–Online Store 2.0 architecture, aren't sold in the Theme Store anymore, and — for Shopify's free vintage themes — only receive security fixes. Online Store 2.0 themes brought sections on every page and dynamic sources; the latest generation adds theme blocks, including the Horizon family. If you're unsure how to tell them apart or whether to upgrade, our guide to Shopify Online Store 2.0 breaks the architectures down.

Theme Generation → Audit Implication

GenerationHow to tellWhat it means for your audit
Vintage (pre–OS 2.0)Predates 2021; no sections on most pages; free vintage themes only get security fixesA rebuild is usually the honest call — vintage themes aren't sold in the Theme Store and won't gain modern features
Online Store 2.0 (Dawn era)Sections on every page, dynamic sources, metafieldsUsually fixable — patch the theme and migrate app code to app blocks where possible
Theme blocks (Horizon family)Theme blocks; Horizon or another recent themeModern base — point the audit at ghost code and app bloat, not the architecture

Ghost Code: The Residue Apps Leave Behind

Here is the trap that catches most inherited stores. When you uninstall an app, does it clean up after itself? Often, no — and Shopify says so plainly.

Uninstalling apps often leaves the code edits, or ghost code, behind in the theme, which can cause quality and performance issues and takes merchants off their theme upgrade paths.
Shopify — Migrate app integrations to theme app extensions — Shopify.dev · View source (shopify.dev)

Shopify draws a sharp line between modern and legacy integrations. Apps built as theme app extensions add app blocks that are removed automatically and entirely when you uninstall them. Older apps worked differently — they added snippets to the theme and injected JavaScript into your layout, and some apps add code to your theme that isn't automatically removed when you uninstall the app. That leftover is what practitioners call ghost code.

In practice it looks like orphaned snippet files with app-branded names — a leftover loox-reviews.liquid or privy-popup.liquid — and render tags that point at snippets which no longer exist. One agency names popup, email-capture, review, and chat apps as the usual culprits for leftover code. The damage is rarely one dramatic file; as one store audit put it, it's accumulation — layers of dead scripts from tools swapped out over the years.

ScriptTags and Injected Trackers: The Invisible Layer

Here is the practical version. If a tracker still fires after you've removed the app, it's almost always theme-injected code you can find by searching the theme (step 3 of the checklist below) — Shopify automatically removes all script tags associated with an app when you uninstall it, so a live ScriptTag rarely lingers. The complication is that a ScriptTag — remote JavaScript an app loads into your storefront or Order status page — has no built-in admin screen that lists it (the Customer events page only shows Web Pixels API apps), so for anything still hidden after your own search, a developer queries the Admin API. These legacy tags are also on a deadline, which brings us to the dated liabilities below.

Beyond the Theme: Apps, Access, and Legacy Layers

Key takeaway

Your App and Access Inventory

Move outward from the code to what surrounds it. This is the fastest part of the audit to do yourself, and often the quickest money saved.

Duplicate apps
Two apps doing the same job — two review tools, two email apps — means you're paying twice for one outcome.
Unused apps
Apps you stopped using may still load scripts on every page for a feature nobody touches anymore.
Staff accounts
Every staff login is a door. Remove people who've left and right-size the rest of the permissions.
Collaborator accounts
Partners you granted access — easy to forget, because they don't count toward your user limit.
Custom apps & API scopes
Admin-created custom apps, and the store data their access tokens are allowed to reach.

Collaborator accounts are the classic blind spot: they're Shopify Partners you allowed in, and collaborator accounts don't count toward your store's user limit, so they don't show up where you'd expect to count heads. Review them, and remove anyone whose work is long finished.

App bloat is the other quiet drain. One audit specialist who reviewed 100 stores put the median app spend at $580 a month, with the top quarter over $1,200 — one person's sample, not a market benchmark, but a useful gut check. Unused apps also cost speed: one audit describes a retired size-guide app that still fired on every product page for a feature no one used.

To measure that on your own storefront, Shopify's free Web Performance report charts your Core Web Vitals against every app install and theme change. For the structural speed patterns behind those numbers — and a store-wide pattern audit — see what the best Shopify stores do differently.

The Dated Liabilities: checkout.liquid and Shopify Scripts

Some of what an audit finds isn't messy — it's expiring. Shopify has been retiring the old ways apps and themes hooked into checkout, and each has a date attached. If your inherited store leans on any of them, they're on borrowed time.

Apps can no longer create ScriptTags on Thank-you / Order status pages
New app installs lost the ability to add ScriptTags to those pages. Apps installed before this date were not affected by the ban itself.Source: Shopify.dev — Blocking script tags
Plus checkout.liquid and Order status customizations sunset
For Shopify Plus stores, this deadline has already passed. Customizations that used additional scripts, script-tag apps, or checkout.liquid on those pages were lost at auto-upgrade.Source: Shopify Help Center — Plus upgrade guide
Shopify Scripts stopped executing
Any Scripts still published were deactivated and no longer run. If an inherited store's discount, shipping, or payment rules quietly changed, this is often why.Source: Shopify.dev — Migrating from Shopify Scripts
Non-Plus Thank-you / Order status auto-upgrade deadline
Still ahead as of July 2026. Non-Plus stores are auto-upgraded to the new pages, and legacy ScriptTags created before February 1, 2025 stop working for non-Plus stores the same day.Source: Shopify Help Center — Upgrade guide

If your store still customizes the Thank-you or Order status pages through checkout.liquid or additional scripts, that's the highest-priority dated item — non-Plus stores are auto-upgraded on August 26, 2026, and those customizations are lost in the process. What replaces them, and what a migration costs, is the whole subject of our guide to checkout extensibility.

Likewise, any discount, shipping, or payment logic that ran on Shopify Scripts already stopped on June 30, 2026 — silently. If an inherited store's rules quietly changed, that is often why; our guide to the Scripts-to-Functions migration maps each piece to its replacement.

Pulling the whole map together, here is what an audit typically surfaces — how serious each finding is, and whether it's a do-it-yourself fix or a job for a developer.

Red Flags at a Glance

What the audit findsSeverityWho fixes it
Render/include tags pointing at snippet files that no longer existBreaks pagesDIY after backup, or developer
Stray script tags hard-coded into theme.liquidSlows the storeDeveloper
Hard-coded prices or currency in the themeBreaks with Shopify MarketsDeveloper
Deprecated {% include %} tagsTech debtDeveloper
Unknown ScriptTags, redirects, or admin users you didn't add (triage this first)Possible compromiseSecure first, then Shopify Support
Two apps doing the same jobWasted spendDIY
A collaborator or staff account you don't recognizeAccess riskDIY — remove it
checkout.liquid or Thank-you/Order status customizationsExpiring Aug 26, 2026 (non-Plus)Developer
Logic that depended on Shopify ScriptsAlready deadDeveloper or app
A vintage theme with heavy custom codeUpgrade blockerDeveloper (rebuild)

Severity and ownership are editorial guidance for a non-technical merchant, not a Shopify classification.

Fix or Rebuild? A Decision Framework

Key takeaway

With the map in hand, the big decision is a fork: patch the theme you have, or rebuild on a modern one. Neither is automatically right.

Lean toward a fix when your theme is a modern Online Store 2.0 or Horizon-generation theme, the customizations are shallow and documented, and the problems are isolated — a few ghost snippets, a duplicate app, one broken section. Lean toward a rebuild when the theme is vintage, the code is deep and undocumented, ghost code has accumulated for years, or you were planning a redesign anyway. Rebuilding on a current theme resets that debt to zero.

What a rebuild keeps — and what it doesn't

A rebuild sounds drastic, but it doesn't touch your catalog. Your products, collections, menus, pages, and blog posts aren't changed when you switch themes — they live in the admin, separate from the theme. What you rebuild is theme-specific: theme settings, section and block layout, text, code customizations (including app-added code), and templates. If a rebuild is your route, our Horizon theme guide covers migrating from Dawn to the current generation.

Not sure which fork is yours? Answer five quick questions about your theme, your code, and how you want to handle it — and get the route that fits, from a free DIY cleanup to a full rebuild.

Fix, Rebuild, or Clean Up: What's Your Route?5 questions → your cleanup route
Question 1 of 5
What brought you to this store?

The Free DIY Audit You Can Run Today

Key takeaway

Whatever route the quiz pointed you to, start here. Even if you'll hire a professional, these free checks tell you — and them — exactly what you're dealing with, and they cost nothing but an hour in your admin. Steps one through seven apply to everyone; the security step matters most if you saw changes you can't explain. Tick each off as you go; your progress saves on this device.

Your Free DIY Store Code Audit

Work top to bottom. Back up first, then move from the theme code outward to apps, access, and the legacy checkout layer.

0 of 8 done
  1. Duplicate your live theme so you have a frozen, restorable copy before you look at or change anything.

  2. Open Online Store, then Themes, then Edit code, and scan layout/theme.liquid for stray script tags and hard-coded snippets.

  3. Search the theme for the names of apps you've already removed, across theme.liquid, snippets, sections, and custom JavaScript files.

  4. List every installed app, flag any that duplicate each other's job or that you no longer use, and note the monthly spend.

  5. Check both staff and collaborator accounts, remove anyone you don't recognize, and confirm two-step authentication is on.

  6. Review any admin-created custom apps and the store data their access tokens are allowed to reach.

  7. Read your Core Web Vitals and the change-impact chart to see how apps and theme edits have affected speed over time.

  8. Look for checkout.liquid customizations, edits to the Thank-you or Order status pages, and any logic that depended on Shopify Scripts, against the retirement dates.

How far to clean up yourself

After you've duplicated the theme, it's safe to remove the obvious dead ends yourself — for example, a render or include tag that points at a snippet file which no longer exists throws a guaranteed error, so deleting that one reference only fixes things. Stop, though, at any live Liquid you don't fully understand, or CSS and JavaScript you can't trace to a source. That is where a wrong deletion breaks a working page — hand it to a developer instead.

Going Deeper: Theme Check and the CLI

If you're comfortable in a terminal, two free Shopify tools go further. The Shopify CLI builds and runs themes locally, and Theme Check is a linter for the Liquid and JSON in your theme — it flags deprecated tags (like the old {% include %}) and common errors automatically. Neither is required for the audit above; they're for readers who want a line-by-line pass. If you'd rather understand the code than lint it, our explainer on Shopify Liquid covers the language itself.

If You Suspect the Store Was Hacked, Secure It First

Key takeaway

Sometimes an audit turns up something worse than mess. Unknown redirects, template changes you didn't make, admin users or apps you never added — these aren't cleanup items, they are signs the store may be compromised. If that is what you are seeing, stop the audit and switch to securing the store.

If you think your account has been hacked or compromised, then contact Shopify Support immediately.
Shopify Help Center — Account security best practices · View source (help.shopify.com)

Treat the following as triage, in order, straight from Shopify's account-security guidance:

1
Change your email password
Log in to the email account you use for Shopify and change its password first — if that inbox is compromised, resets won't help.
2
Change your Shopify password
Log in to Shopify and reset the password for your Shopify user account.
3
Turn on two-step authentication
Activate two-step authentication so a stolen password alone can't get back in.
4
Review login and staff activity
Check your account for suspicious logins, and remove any staff or collaborator you don't recognize.
5
Check financial and banking details
Review your financial accounts and payout details for any unauthorized activity or changes.

Once you're back in control, restore the theme from a known-clean backup rather than trying to clean the live one by hand. If you can't tell what was changed, that's the point to bring in both Shopify Support and a developer.

This is triage, not forensics

The steps above lock the store back down; they are not a malware investigation. For a confirmed breach — especially one involving customer data — involve Shopify Support and a developer experienced in incident response, and don't rely on a checklist alone.

What to Demand From an Auditor

Key takeaway

If the audit is beyond what you want to do yourself, the quality of what you hire is decided by what you demand up front. Across agencies that publish their audit format, the good ones are consistent: one documents each finding with a recommended fix, an effort estimate, and an impact projection; another prioritizes critical issues first. The output should be a fix list ranked by impact, not a page of generic advice.

A written report
Every finding documented, not a verbal summary you can't act on a week later.
Priority ranking
Issues ranked by impact and effort, so you fix what matters first, not what's easiest.
A fix estimate
Rough cost or hours per fix, so you can decide what to do in-house versus hire out.
A clear scope and timeline
Whether implementation is included or quoted separately, and when you'll get the report.

Give the auditor access scoped to what the review needs, and revoke it once the report lands — the same hygiene you'd apply to any outside contractor. For the full process of finding, vetting, and briefing someone, see our guide to hiring a Shopify developer.

And if you're not sure whether you need a quick cleanup, a fix, or a full rebuild in the first place, our Shopify development guide routes you to the right specialist in about a minute.

How Much Does a Shopify Store Code Audit Cost?

Key takeaway

There is no official price list for a code audit, and the honest answer is that it depends on scope and on who you ask. The ranges below come from individual vendors' own pages — useful for orientation, not a market rate.

Audit Price Ranges by Type

Audit typePrice (one vendor)Source
Independent technical audit$500–$5,000kaspianfuad
Full-store, multi-layer audit$2,000–$5,000kaspianfuad
Agency audit (including Plus)$5,000–$20,000kaspianfuad
Theme audit and recommendations$500–$2,500ShopExperts
One-time conversion / CRO audit$500–$3,000ShopExperts
Productized audit (audit-only, 7–9 days)$699–$799NinjaNutz

Each figure is one vendor's own listed price, not a market benchmark or official Shopify data. Hourly work runs about $110/hour for a single project (ShopExperts, formerly HeyCarson) up to $150–$300/hour at agencies. Verify current pricing on each vendor's page.

If the audit points to a rebuild rather than a patch, budget that separately. One agency lists a custom Shopify rebuild at $5,000–$20,000 and patching an existing theme at $2,000–$10,000+; another places a configured pre-built theme at $3,000–$5,000 and a fully custom build at $10,000–$20,000. Those are single vendors' figures too.

For the full build-budget picture — parts, scenarios, and rates by region — see our guide to Shopify store development cost.

After the Audit: Keep the Store Auditable

Key takeaway

The point of an audit is to never need a bad one again. A little discipline keeps your store legible, so the next review takes an hour, not a week.

One change, one backup
Duplicate the theme before every edit, so you can discard a change and start again if it breaks something.
Use GitHub version control
Shopify's GitHub integration syncs theme code both ways, so every change is tracked and reversible.
Keep a change log
A short note of what you edited and when turns the next audit into a quick review, not a dig.
Prune old themes
Keep backups, but stay under your plan's theme limit and delete copies you no longer need.

The single highest-leverage habit is version control. Shopify's official GitHub integration syncs your theme code to and from a repository, so every change is tracked and reversible — even if you never write code yourself, it gives you a history of who changed what. This walkthrough shows how to set it up without being a developer:

Find Every Code Change You've Made to Your Shopify ThemeA non-developer walkthrough of connecting GitHub to a Shopify theme so every code change is tracked and reversible.

Backups matter too: duplicate the theme before every edit, and prune old copies so you stay under your plan's theme limit — 20 themes on Basic, Grow, and Advanced, and up to 100 on Shopify Plus.

The Bottom Line

Key takeaway

There is no single “store code audit” that fits everyone. What is fixed is the order of operations: look before you touch, know which generation your theme is, and separate a messy store from a compromised one. Get those right and the path is obvious — miss them and you either overspend on a rebuild you didn't need or keep living with problems you can't see.

Do the free pass first. Most of what you're worried about — ghost code, duplicate apps, forgotten access — you can see yourself, for free, in an afternoon. Spend money only where the audit shows a real fix or a rebuild is warranted, and treat any sign of tampering as a security issue before it's a code one.
Your Next Step by Stage
Just inherited itRun the free checks yourself and find out what's really inside before you spend a cent.Start the DIY audit
Found real problemsGet a scoped audit with a prioritized, effort-ranked fix list you can act on.Get a scoped audit
Time to rebuildRebuild on a modern, upgrade-safe theme with your catalog carried over — done for you.Plan a rebuild

Not Sure What You Inherited? Get It Audited.

Stop guessing what's buried in your theme. Get a developer to audit the code, ghost scripts, and access on the store you took over — and a clear, prioritized plan for what to fix or rebuild.

Get a code audit

Frequently Asked Questions

A Shopify store code audit is a structured review of everything under your storefront's surface: the theme's Liquid code, leftover code from removed apps, injected ScriptTags, your app and access inventory, and the legacy checkout layers Shopify is retiring. The goal isn't to rewrite anything — it's to decide what's safe to keep, what to fix, and what to rebuild.
Yes. The core of an audit runs entirely from your Shopify admin at no cost — reviewing installed apps, staff and collaborator access, the theme code editor, and the free Web Performance report. Looking changes nothing; the code editor only saves when you click Save. You only need a developer for fixes you can't safely make yourself.
Many apps add code directly to your theme — snippets, and JavaScript injected into theme.liquid — and Shopify doesn't automatically strip that out when you uninstall. Modern apps built as theme app extensions remove their blocks cleanly, but older integrations leave 'ghost code' behind. That residue keeps loading, slows the store, and can block theme upgrades until someone removes it.
There's no built-in admin screen that lists active ScriptTags. Shopify's Customer events page only shows apps built on the Web Pixels API, and the ScriptTag resource is API-only. To see legacy ScriptTags, you or a developer query the Admin (GraphQL) API, or you ask the app's developer directly. ScriptTags do get removed automatically when you uninstall the app.
No. Your products, collections, menus, pages, and blog posts live in the Shopify admin, separate from the theme, so switching to a new theme leaves them untouched. What doesn't carry over is theme-specific: your theme settings, section and block layout, text, code customizations (including app-added code), and available templates all have to be rebuilt.
It depends mostly on your theme's generation and how customized it is. A modern Online Store 2.0 or Horizon theme with shallow edits is usually worth patching. A vintage, pre-2021 theme, or one buried in undocumented custom code, is usually cheaper to rebuild than to keep debugging. Run the free audit first, then let the findings decide.
It varies by scope and vendor. Individual agencies list independent technical audits around $500–$5,000, full-store audits at $2,000–$5,000, and agency or Plus audits reaching $20,000; one productized audit runs $699–$799. These are single vendors' own prices, not a market benchmark. Hourly work ranges from about $110 to $300. A scoped quote is the only real number.
Watch for changes you never made: unknown ScriptTags or redirects, altered templates, staff or collaborator accounts you don't recognize, and apps you didn't install. Shopify's guidance is direct — if you think your account is compromised, contact Shopify Support immediately. Secure the store before touching any code: reset passwords, enable two-step authentication, and remove unknown access.
Demand a written report, not a verbal 'looks fine.' A good one documents each finding with a recommended fix, an effort estimate, and an impact projection, and ranks issues by priority — critical problems first. It should state clearly whether implementation is included or quoted separately. Most agencies deliver in roughly three to nine business days.
Your app subscriptions and their data aren't tied to the theme, so uninstalling or changing a theme doesn't cancel your apps or bill you again. But any app blocks or embeds an app placed in the old theme won't appear automatically in the new one — you re-add and reposition them per theme, since theme content is unique to each theme.
Not immediately — upgrading to Online Store 2.0 isn't mandatory, and a vintage theme can keep running if it meets your needs. But vintage themes aren't sold in the Theme Store, and Shopify's free vintage themes only receive security fixes, not new features. If yours blocks features you need or hides heavy custom code, a rebuild is the honest path.
Adopt one rule: one change, one backup. Duplicate the theme before every edit, and prune old copies (plans allow up to 20 themes, Plus up to 100). For real version history, connect Shopify's GitHub integration so every code change is tracked and reversible. Keep a short change log of what you edited and when, so the next audit is quick.
About This Article
Shopify Developer & E-Commerce Writer
9+ years with Shopify since 2017

Front-end developer specializing in Shopify since 2017. Experienced in building custom Liquid themes, optimizing storefront performance, and integrating third-party apps. Writes in-depth, data-driven e-commerce guides based on hands-on experience with real merchant stores.

Continue Learning

What to Read Next

Stay updated

Get notified about new articles

Subscribe to receive updates when we publish new Shopify guides and insights.