Can leftover app code be detected in our theme?

Can leftover app code be detected in our theme?

amoxham10
Tourist
10 0 2

I’ve done trials of dozens of apps over the last few months. I uninstalled them but I’m not sure if there’s any leftover code. I know it’s best practice to her create a back up of the theme and I re-publish it after you uninstall the apps you don’t want but that is not an option. Please let me know if there is a way to find codes in our theme that are unnecessary 

Replies 9 (9)

Guleria
Shopify Partner
4063 798 1147

Hello @amoxham10 ,

Only one way check the files manually and identify the code. There is no other way available.

Thanks

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
amoxham10
Tourist
10 0 2

Any tips on what to look for? And where to start removing and stop? 

Guleria
Shopify Partner
4063 798 1147

Most of app's write their code in theme.liquid

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
amoxham10
Tourist
10 0 2

See line 196. That's an app we uninstalled. Where can I begin removing?

Victor
Shopify Staff
2611 236 566

Hi @amoxham10,

 

Once you uninstall an app any relevant code from the app should then be removed from your theme, which is what happens in most cases. On some occasions some stray lines of code may be left behind; they're often harmless and will have no negative effects on your store, but in some cases they can cause problems.

 

If you find code in your theme's HTML that appears to be leftover from an uninstalled app, then you should be able to remove it without seeing any adverse consequences. However, as a precaution, it's good practice to duplicate your theme before you make any changes so you can revert to a back up if needed.

 

You can also reach out to the developers of any apps you've installed directly and ask them about the code you've found, and if it can be safely removed. 

Victor | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

amoxham10
Tourist
10 0 2
I don't know where the codes start and stop.
Victor
Shopify Staff
2611 236 566

Hi @amoxham10,

 

That is understandable as various apps will place code through your theme's code. Are you experiencing any issues that you believe are related to this leftover code, or are you just trying to be proactive and clean up your theme's HTML before any potential issues arise?

Victor | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

amoxham10
Tourist
10 0 2
The website is very very slow.
Victor
Shopify Staff
2611 236 566

Hi @amoxham10,

 

Okay, thank you. One thing you can try is searching for {% comment %} tags within your theme's code, as many app developers will mention the app's name within these tags. If you find these tags with the app's name included but are still unsure on what to remove, then you can look up the app on the Shopify App Store and find the developer's contact information in order fo you to ask them how to safely remove the code.

 

You can also look into hiring a Shopify Expert if you feel that you need professional assistance in cleaning up your theme's code and improving your site's speed.

 

Please also bear in mind that it is not just app code that can cause a slowdown of your storefront, and that there are a variety of things you can do to improve your online store's speed. Other things that you can focus on include disabling theme features you are not using and making sure that you don't have too many large images or videos on your pages which take a long time to load.

Victor | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog