How can I remove unused code after uninstalling apps?

Topic summary

Core Issue:
Shopify store owners struggle with leftover code from uninstalled apps that slows page speed. No automated app exists to clean this code.

Key Findings & Solutions:

  • Shopify’s New Requirements: As of ~2 months ago, Shopify requires apps to provide automatic code removal upon uninstallation. Users should reinstall apps briefly to check for cleanup buttons.

  • Diagnostic Approach: Use Chrome DevTools (right-click → Inspect → Network tab) to identify slow-loading resources and trace them to specific apps or theme files.

  • Common Culprits:

    • Facebook Pixel requests (often duplicated, sometimes 3+ instances)
    • Review apps (Ali Reviews, Judge.me, Yotpo, Opinew)
    • Loyalty/rewards programs
    • Chat widgets and email marketing tools
    • Unused CSS/JavaScript from themes
  • Recommended Actions:

    1. Contact app developers for optimization help
    2. Add loading="lazy" to image tags for lazy loading
    3. Search theme files for app references using text editors
    4. Consolidate duplicate pixels/tracking codes
    5. Remove unused apps completely following developer uninstall guides

Important Caveats:

  • Some JavaScript loads after main page (via Shopify script tags), so doesn’t actually slow initial load despite Google reports
  • Theme core files shouldn’t be modified without expertise
  • Google Lighthouse scores simulate slow connections and may not reflect real user experience
  • Professional developer help recommended for complex code removal
Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi @CONOR3 ,

Just had a quick look at your store.

You’ve got quite a couple of quite large-sized images like the main phone case shot. It would be idea to add lazy loading too these, which can be done by adding

loading="lazy"

to any image tag i.e:


or try and downsize the image size a bit, there’s one currently at 700kb, which could probably be around 200kb.

Facebook takes up quite a bit of time, also there’s quite a few requests from your theme taking up time. There’s a product options app that blocks load time for 800ms when the customer first lands on your site too (I think).

Hope that helps,

Oli

——————————

Founder [email removed] www.preproduct.io

Test and make sales for future products