How to clear unused code ?

Highlighted
Shopify Partner
159 2 25

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:

<img loading="lazy" otherstuff="this and that" etc >

 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 @ www.preproduct.io

Test and make sales for future products

 

 

0 Likes
Highlighted
New Member
1 0 0
Click to expand...
Qualitycheck, can you contact us at marketing@glossventures.com - we're interested in your services in clearing out bad code
0 Likes
Highlighted
Tourist
4 0 1

Hey man,

Really hoping you can help me out before I end up paying a company $300 to clean up code and optimize speed. Shopify shows a score of 22.....and I definitely did some experimenting with apps before figuring out what worked and what didn’t, so I’m sure there’s a mess of code.

 

www.rogayoga.com

 

....any chance you’re for hire? Lol

0 Likes
Highlighted
Shopify Partner
159 2 25

Hii @kazamimi ,

I don't offer paid services as it takes time away from developing/running PreProduct. I am happy too have a quick look at your store though.

I think there might be some low hanging fruit here, you have three different requests from Facebook (which are also the biggest js requests). Have you got three different pixels installed? or Maybe a pixel installed and some Tag manager stuff as well?
If you could consolidate down to one Facebook request, that could increase page speed quite nicely.

The next opportunity to cutdown on unused Javascript is a sizing plugin. it doesn't look like it's being irresponsible or anything like that, but if you'ree not using it, I would recommend removing it from your codebase.

Your theme's stylesheet has about a seconds worth of unused styling rules according to Google, but it might be more trouble that it's worth to find and remove them safely.

You've for quite a few small opportunities as well, here's the complete list of unused Javascript processes according to Google:

Hope that helps,

Oli

133.1 KB
124.9 KB
132.8 KB
124.7 KB
133.2 KB
113.9 KB
106.9 KB
76 KB
149.8 KB
73.1 KB
135.3 KB
72.3 KB
62.1 KB
60.9 KB
71.3 KB
58.8 KB
114.6 KB
51.2 KB
264.4 KB
39.7 KB
71.4 KB
39.7 KB
71.6 KB
36.4 KB
/js/sharethis.js
(platform-api.sharethis.com)
61.3 KB
34.5 KB
/en_US/fbevents.js
(connect.facebook.net)
67.8 KB
33.9 KB
40.8 KB
33.7 KB
50.4 KB
32.8 KB
51.3 KB
30.2 KB
61.4 KB
24.3 KB
36.6 KB
21.7 KB
…1.11.1/jquery.min.js
(ajax.googleapis.com)
33.1 KB
21.4 KB
59.4 KB
21.3 KB
37.8 KB
17.7 KB
24.6 KB
14.3 KB
30.3 KB
13.4 KB
13.4 KB
10.8 KB
19.2 KB
10.8 KB
14.2 KB
8 KB
18.6 KB
6.9 KB
11.9 KB
4.7 KB
13.5 KB
3.9 KB
3.6 KB
2.9 KB
9 KB
2.5 KB
5.2 KB
2.4 KB

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

0 Likes
Highlighted
Trailblazer
158 4 22

hi Oli, 

 

as with everyone else im having a bit of trouble with load speed for mobile. 

Desktop seems to be fine but my mobile speed is terrible. 

Any pointers on how to speed the site up. 

 

website is: Thetinycrate.com.au

 

Thanks

 

Jess

0 Likes
Highlighted
Shopify Partner
159 2 25

Hi @jtan ,

Yep, no worries. Your site loads super fast on my Mac by the way, like 1/2 a second type fast.

The biggest opportunity to remove unused Javascript is coming from an app, it might be a wishlist app, I'm not quite sure. Here's the entry:

164.6 KB
128.7 KB
 

 

After that, the big requests are all from your theme or Facebook.

Hope that helps,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

0 Likes
Highlighted
Trailblazer
158 4 22

Hi Oli,

 

Thanks for your reply. 

 

Are you getting those same speeds on your mobile phone?

 

It seems like the desktop site is working well but the mobile site might be slow. 

 

Thanks

 

Jess

0 Likes
Highlighted
Shopify Partner
159 2 25

Hi @jtan ,

I haven't tried on my phone but my guess would be no.

I suppose the most common causes of sub-par speed are:

  1. Over-sized app files/requests
  2. Un-optimised image files (without lazy-loading)
  3. Big theme requests.

Number 3 is tricky to optimise as themes are quite complex and easy to break. Numbers 1 and 2, you could focus on though (with the app in my last reply being a good place to start).

Cheers,

Oli

 

——————————

Founder @ www.preproduct.io

Test and make sales for future products

 

 

0 Likes
Highlighted
New Member
1 0 0

Hi Oli,

Google identified 5s worth of unused javascript code. How I go about clearing this?

 

3.8 KiB
930 ms
54 KiB
1,980 ms
31.7 KiB
1,680 ms
1 KiB
780 ms
8 KiB
1,080 ms
102 KiB
2,280 ms
/app.js
(shopoe.net)
0.6 KiB
780 ms
0 Likes
Highlighted
New Member
1 0 0

Hi Oli,

 

Could you please take a look at savecobradford.co.uk? 

 

Kind regards

Naz

0 Likes