Bulk find assets, which are used in none of the bulk tested URLs or just in a few page types.
You probably know the Coverage Report in Chrome. With the tool you can find assets which are in % unused.
It’s especially interesting I think with a quick and dirty bundled Wordpress with a multi purpose theme and a lot of plugins. In these cases you will find often many scripts switched on but never used.
Automated Coverage Reports for multiple URLs
Puppeteer is perfect to find out coverage for multiple URLs. Here’s a litte script to do it
The results of the script
The script creates a CSV with url, asset url and unused %. A pivot table with row = asset url will create something like this:
It’s sorted by average % unused. So 100% tells us that the file wasn’t used at all in 12 tested URLs. As a follow up I would go with all assets I really control on my domain (yellow) + the ones which were found on all tested 12 URLs (orange).
With a quick and dirty Wordpress it may happen that you find a lot of 100% unused files. A more professional setup looks more like this:
For blick.ch a lot of unused stuff is external.
To check unused variance is interesting too: