FROM CACHE - en_header

Help with this code snippet impacting speed score

PorridgeHead
New Member
2 0 1

Hi All,

I notice my store's speed score on mobile is 36 and it changed to 56 once I removed the below snipped from the file theme.liquid. Can someone please help me understand what does this code really do? Thanks in advance!

  <script src="https://shopoe.net/app.js"></script>

 

Replies 4 (4)
Elias
Shopify Staff
Shopify Staff
1863 189 307

Hi, @PorridgeHead.

Elias here with Shopify Support. Thank you for reaching out.

It looks like you may have removed a line of javascript code that allows your theme to function with apps on your store. Simply put, by removing apps, your store will perform much faster. For example, a plain information page (eg. Wikipedia) will load faster than an online store (eg. Nike or Shopify stores). If you're looking to improve your speed score, we've got some specific recommendations for Shopify stores here - Improving your online store speed

That being said, since removing this line of javascript, are you seeing any issues with apps on your store?

Elias | 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

JoesIdeas
Shopify Expert
1691 146 435

@PorridgeHead we see most sites that we optimize having old app code from uninstalled apps in the past. If this code you removed was from an old app, you did the right thing and have nothing to worry about.

The reason why old app code lingers is that after you delete an app, the app immediately loses access to your store, so if it added code to your theme then that needs to be removed. Responsible app developers will send a notification email with uninstall instructions, but sadly this is not common.

To check for additional old app code:

1) Duplicate your live theme and work off the backup theme (always do this when making edits to your site)

2) Open up your common template files: theme.liquid, index.liquid, product.liquid, collection.liquid, cart.liquid, article.liquid

3) In each file, read the code and look for scripts, include / render statements, or pieces of code that you recognize being related to an app you had previously uninstalled. Good app developers will add code comments so you know what app it's from. If there is no code comments around an external script or render / include, then look at the file name, and google it if you don't recognize it, that can also give you a clue to the scripts function. For templates like collection and product, it will include snippets, you'll have to open those snippets if you want to do a full investigation.

Most of the old app code we find is in theme.liquid, so I would start there. Probably 90% actually is there so if you just clean up that file you'll be in good shape. If you get stuck or need help feel free to reach out to my team at speedboostr.com/contact

• Creator of Order Automator (automation app to save you and your team time on admin tasks)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people
PorridgeHead
New Member
2 0 1

Thanks @Elias for responding!

That being said, since removing this line of javascript, are you seeing any issues with apps on your store?

I verified some of the apps which add a few widgets on home page and surprisingly those are still working after removing this line of javascript. That's what got me wondering what this line is even doing

Elias
Shopify Staff
Shopify Staff
1863 189 307

Hey, @PorridgeHead.

Thank you for following up!

I'm glad to hear that removing this line of code had no impact on your existing apps. Based on the URL in the snippet and as suggested by @JoesIdeas, it does appear to be an old coding from an app developed by Shopoe. However, it is possible that their apps have been delisted, as I'm not seeing any apps developed by Shopoe in our App Store at this time.

That being said, you can also check your theme code by downloading a fresh copy so that you can review and compare the coding. Nevertheless, if you haven't updated your theme in awhile, then it may also be worth considering to update your theme. This way, you can get some of the newer features that comes with your theme and to see if your theme is compatible with Online store 2.0 as well. 

Which theme are you currently using? Also, can you check which version of the theme you have currently?

Elias | 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