Website Grader

Highlighted
Regular Contributor | Partner

Hi,

I was wondering if anyone has experience trying to boost their score in HubSpot's website grader? It can be found online at website.grader.com.

I noticed that it scores my website but doesn't provide much information about how to fix the issues, it keeps its messaging very high level. I understand it might be more of a sales tool designed to make people buy CMS but I've noticed some websites already on CMS not ranking brilliantly.

The main issues are around Javascript security. From looking into this I noticed that HubSpot allows jQuery 1.7 and 1.11 both of which are listed as having security vulnerablities by Google's lighthouse system which powers the HubSpot grader. The question is why does HubSpot only allow 1.7 or 1.11, why not allow a more recent version so we can fix this issue?

Also I noticed that the pages have a lot of HTTP requests. There's a lot of files that HubSpot pull into our pages without me requesting or specifying them. Does anyone know the best way to combine and minify the default JS and CSS files included on a page by HubSpot. 

Even my own default CSS, I keep my CSS files separete as part of a my development process where I use media queries in the <head> to pull the correct one in based on the viewport size. I'd like to combine and minify my own CSS but I don't want to loose my original seperate CSS files. Does HubSpot provide a way to do this automatically so I can keep my workflow but have the files merge and minify on the site?
 
Thanks very much for your help,

David

Reply
0 Upvotes
3 Replies 3
Highlighted
Community Manager

Hey @david_eic  

 

I hope you are well and safe.I'll tag a few experts that could share their thoughts with you.   

 

Hey @Kevin-C @mike-ward @stefen   could you please share your expertise with @david_eic ?       

 

Thank you

Sharon

Highlighted
Advisor | Gold Partner

@david_eic as of this week, you can now disable jQuery all-together. Then you could manually add jQuery back to your site with one of the latest versions or if your website theme/modules don't require jQuery, you could just leave it off.

 

Regarding minifying and combining, HubSpot should be doing that automatically for you as long as you don't have any syntax errors in your js/css files. If you're not seeing them minified on the front-end of the site you should run your files through something like Prettier to make sure you aren't missing any semi-colons or what have you.

--
Stefen Phelps
Web Developer / Co-founder
Kelp Creative Agency
Twitter — @stefen
Highlighted
Esteemed Contributor

Hi David,

 

Re: the default HS files. The CSS files should combine automatically, although they don't always seem to minify. I'm not sure how that's controlled, but suspect it's automatic and it will minify where it can.

 

For the HS JS files, there's not a lot you can do about this I'm afraid, there's no way for you to interact with the asset packaging pipeline for HubSpot.

 

Re: your own CSS files. Those should automatically get combined. I'm looking at one of my complex HS pages now with multiple CSS files and several HS modules and I'm seeing only one CSS file in Dev Tools. On a similar note, if you want to turn off any HS combining/minifying on your CSS/JS files you can use the query parameter:

?hsDebug=True

on the end of any URL (preview or live). Sometimes that can help with debugging any minifier issues.

 

If you want more detail on the performance, trying some other site performance tools may help. GTMetrix is my favourite - sign up for a free account to skip the queues and get richer features. The waterfalls and video renders are very useful to see real-world performance.

 

As you're probably aware, it can be challenging to get very high scores on any CMS due to the nature of rendering from a DB vs static sites, and the inevitable overhead of the feature-rich tools in HubSpot. Focus on the Paint times and OnLoad event fire times and do your best to optimise for those.

 

Cheers,

Mike