Do your WordPress Pages Use Too Many JavaScript and CSS Files? Fix This SEMRush Site Audit Warning Now!

Recently I encountered a warning in the SEMrush site audit report for the ThosPFuller.com WordPress website which indicated that two pages use too many JavaScript and CSS files. This is potentially a problem, not just for the pages identified, but for the entire site. The WordPress Content Management System (CMS) follows a plugin architecture which means that JavaScript and CSS files may be unnecessarily included across the entire site, hindering performance for all posts and pages. The ThosPFuller.com website does not have any custom PHP coding and this problem is unlikely to be related to the core WordPress platform, so that leaves us with the plugins which are likely the culprit here — it is reasonable to suggest that we have one or more plugins in use that should be disabled and/or deleted.

The SEMrush Site Audit Investigation

This issue was identified from the resultant SEMRush Site Audit report. A picture of the report appears below with a pointer to the top issues. I am a bit surprised this hasn’t impacted more pages but for whatever reason, two stand out and this is a potentially more significant issue than perhaps appears at first glance.

A SEMrush Site Heath report with a pointer to Top Issues where 2 pages use too many JavaScript and CSS files.
Why do 2 pages use too many JavaScript and CSS files?

Diagnosing The Pages Use Too Many JavaScript and CSS Files Issue

I looked into this a bit and suspected that the issue was likely due to the following:

  1. The ThosPFuller.com site uses the OceanWP Theme and Elementor page builder plugin.
  2. The Gutenberg WordPress theme plugin and CoBlocks page builder plugin (see also CoBlocks on GitHub) are both present but not in use.
  3. We shouldn’t need these two WordPress plugins and the site functions fine after deactivating them.

Prior to disabling these plugins I checked one of the identified pages and noticed that it had 114 occurrences of “.js” and 99 occurrences of “.css” in the page source (this count was determined using a simple find). After disabling these plugins the same page had 65 occurrences of “.js” and 66 occurrences of “.css” and the SEMrush warning is gone.

Below we can see the site audit report after these two plugins were disabled — note that the “2 pages use too many JavaScript and CSS files” top issue is now gone and the Site Health has improved by 1%, the Site Performance has improved by 4% and we also have fewer warnings and notices.

A SEMrush Site Heath report with a pointer to Site Performance improvement of 4% and an overall Site Health improvement of 1%.
The issue where two pages use too many JavaScript and CSS files has been fixed!

Why You Should Remove Unused WordPress Plugins 

According to the article entitled “Removing Unused WordPress Plugins” by Oliver Whitham [1]:

By learning how to fully uninstall plugins you no longer use, you can ensure that your website doesn’t accumulate files and data you don’t need. In practice, this means you can keep your site running smoothly and your loading times lean.

Expanding on this quote above, there are specific benefits to only using required WordPress plugins:

  1. You know exactly what you need for your WordPress website to function properly.
  2. It’ll be easier to update versions of PHP because there are fewer plugins that may be outdated. Outdated plugins that rely on older versions of PHP can be problematic and block an upgrade which then impacts the upgrade path for the entire site.
  3. The surface area for website security-related issues will be smaller [1].
  4. This avoids database bloat [1] however the MySQL instance your WordPress website relies on may benefit from optimization as plugins often leave dependent tables and data in the database — there are WordPress optimization plugins that can help with this [3, 4].
  5. It is, generally speaking, good software development practice to use only what you need. This idea applies as much to WordPress administration as well.
  6. Plugins can have ramifications that impact the entire site and not just these two pages identified in the SEMrush Site Audit report.
  7. Unused plugins that are still active can have a performance impact across the entire WordPress website. If it’s bad enough the bounce rate might be artificially inflated because people aren’t waiting for pages to load. This becomes particularly important when optimizing for speed as there’s the potential to get some quick and easy performance gains simply from removing unused plugins.
  8. If you’re running WordPress in the Amazon Web Services Cloud (AWS) or on another cloud provider with a similar billing strategy, a slow WordPress website will likely result in a higher monthly bill.

When it comes to Performance optimization, which is related to Technical SEO, everything listed above comes into focus when it pertains to achieving fast page load times. Below I’ve included a picture of one of the performance reports for an article on this site. Performance engineering is something I spent a fair amount of time on and achieving fast results, even when hosting WordPress with a fast provider, still requires effort, discipline, and constant attention.

The GTMetrix Performance Report for the Technical SEO article entitled "Hot to Fix the og:image Open Graph Meta Tags Are Missing Critical Issue". with a grade of A, performance at 94% and structure at 95%; web vitals include an LCP at 1.1s, TBT at 171ms, and CLS at 0.02.
GTMetrix.com Performance Report for the How to Fix the og:image Open Graph Meta Tags Are Missing Critical Issue Technical SEO article.

For simple blogs what I’ve mentioned above may be low-priority issues however for high-traffic WordPress eCommerce websites these problems can impact the bottom line, and losing both customers and their money quickly becomes a serious problem.

Conclusion

I hope this article has been helpful at revealing how a simple issue identified by a SEMrush Site Audit report that indicates that several pages have too many JavaScript and CSS files can turn out to be a fairly significant problem.

It is still possible that there are other plugins adding unnecessary JavaScript and CSS files however I tend to be fairly judicious with my use of plugins and this is less likely at this point.

Have you encountered this problem? Do you disagree with anything here or have I forgotten anything? Let me know in the comments!

Technical SEO References

  1. Removing Unused WordPress Plugins
  2. The original Technical SEO / pages use too many JavaScript and CSS files issue post on LinkedIn
  3. 14 Best WordPress Database Plugins (Clean and Optimize Your DB) by Matteo Duò
  4. WordPress Database Plugin: 6 Options for Cleaning and Development
  5. How to Fix the og:image Open Graph Meta Tags are Missing Critical Issue

thospfuller

I am a Technical SEO Consultant and WordPress Specialist based in Northern Virginia. I am interested in software development, content engineering, and business. I'm originally from Chicago, IL, and currently reside in Reston, VA.