67% wp-asset-clean-up

Code Review | Asset CleanUp: Page Speed Booster

WordPress plugin Asset CleanUp: Page Speed Booster scored67%from 54 tests.

About plugin

  • Plugin page: wp-asset-clean-up
  • Plugin version: 1.3.9.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Aug 1, 2023
  • Number of updates: 855
  • Update frequency: every 3.3 days
  • Top authors: gabelivan (100%)

Code review

54 tests

User reviews

1452 reviews

Install metrics

100,000+ active /3,888,098 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▲3.00ms] Passed 4 tests

Server-side resources used by Asset CleanUp: Page Speed Booster
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2844.74 ▲2.49
Dashboard /wp-admin3.58 ▲0.2878.70 ▲34.39
Posts /wp-admin/edit.php3.64 ▲0.2959.06 ▲12.81
Add New Post /wp-admin/post-new.php6.12 ▲0.2389.92 ▼8.74
Media Library /wp-admin/upload.php3.42 ▲0.2040.44 ▲5.42
Plugins Manager /wp-admin/admin.php?page=wpassetcleanup_plugins_manager3.5047.08
Getting Started /wp-admin/admin.php?page=wpassetcleanup_getting_started3.4838.83
Bulk Changes /wp-admin/admin.php?page=wpassetcleanup_bulk_unloads3.5446.22
Go Pro /wp-admin/admin.php?page=wpassetcleanup_go_pro2.056.78
CSS/JS Manager /wp-admin/admin.php?page=wpassetcleanup_assets_manager3.5248.29
Overview /wp-admin/admin.php?page=wpassetcleanup_overview3.5248.95
License /wp-admin/admin.php?page=wpassetcleanup_license3.4844.41
Settings /wp-admin/admin.php?page=wpassetcleanup_settings3.8355.38
Tools /wp-admin/admin.php?page=wpassetcleanup_tools3.5746.20
Help /wp-admin/admin.php?page=wpassetcleanup_get_help3.4943.25

Server storage [IO: ▲3.44MB] [DB: ▲0.02MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • You have illegally modified 7 files (0.19KB) outside of "wp-content/plugins/wp-asset-clean-up/" and "wp-content/uploads/"
    • (new file) wp-content/cache/asset-cleanup/js/index.php
    • (new file) wp-content/cache/asset-cleanup/css/index.php
    • (new file) wp-content/cache/asset-cleanup/.htaccess
    • (new file) wp-content/cache/asset-cleanup/_storage/item/.empty
    • (new file) wp-content/cache/asset-cleanup/css/item/inline/index.php
    • (new file) wp-content/cache/asset-cleanup/js/item/inline/index.php
    • (new file) wp-content/cache/asset-cleanup/index.php
Filesystem: 303 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
wpassetcleanup_global_data
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Asset CleanUp: Page Speed Booster
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,105 ▲37013.25 ▼1.151.96 ▲0.3337.43 ▼5.80
Dashboard /wp-admin2,449 ▲2605.98 ▲0.81111.78 ▼2.5478.75 ▲36.36
Posts /wp-admin/edit.php2,349 ▲2602.28 ▲0.2442.78 ▲6.7740.40 ▲7.42
Add New Post /wp-admin/post-new.php6,688 ▲5,16123.39 ▲0.08915.85 ▲237.5854.69 ▲2.33
Media Library /wp-admin/upload.php1,631 ▲2434.18 ▼0.01110.65 ▲15.0886.13 ▲42.73
Plugins Manager /wp-admin/admin.php?page=wpassetcleanup_plugins_manager1,2851.9535.6598.98
Getting Started /wp-admin/admin.php?page=wpassetcleanup_getting_started1,1841.8232.0546.05
Bulk Changes /wp-admin/admin.php?page=wpassetcleanup_bulk_unloads1,4692.0637.2258.83
Go Pro /wp-admin/admin.php?page=wpassetcleanup_go_pro5,2936.73386.24228.61
CSS/JS Manager /wp-admin/admin.php?page=wpassetcleanup_assets_manager4,9642.3559.66143.27
Overview /wp-admin/admin.php?page=wpassetcleanup_overview1,2911.9431.2946.62
License /wp-admin/admin.php?page=wpassetcleanup_license1,2311.8430.5444.38
Settings /wp-admin/admin.php?page=wpassetcleanup_settings5,4462.1042.7361.42
Tools /wp-admin/admin.php?page=wpassetcleanup_tools1,3381.8431.9641.73
Help /wp-admin/admin.php?page=wpassetcleanup_get_help1,3621.8330.5951.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wp-asset-clean-up/classes/Misc.php+1910
    rmdir(wp-content/cache/asset-cleanup/css/item/inline/.): Invalid argument
  • Zombie WordPress options detected upon uninstall: 7 options
    • wpassetcleanup_global_data
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-asset-clean-up/wpacu.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/path-converter/src/Converter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/minify/src/Exceptions/IOException.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/minify/src/JS.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/wp-asset-clean-up/classes/OptimiseAssets/CombineCssImports.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/minify/src/CSS.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/path-converter/src/NoConverter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/wp-asset-clean-up/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpassetcleanup_go_pro
    • > Javascript (warning) in unknown
    https://www.gabelivan.com/items/wp-asset-cleanup-pro/?utm_source=plugin_go_pro 1962 A parser-blocking, cross site (i.e. different eTLD+1) script, https://secure.statcounter.com/counter/counter.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
    • > GET request to /wp-admin/admin.php?page=wpassetcleanup_go_pro
    • > Console-api (warning) in unknown
    https://cdn.paddle.com/paddle/paddle.js 0:155840 "[Paddle Debug]Ignoring \"Visit\" as this isn't an affiliate visit."

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: defer css javascript, minify javascript, dequeue, minify css, performance...

wp-asset-clean-up/wpacu.php 77% from 13 tests

Analyzing the main PHP file in "Asset CleanUp: Page Speed Booster" version 1.3.9.3
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-asset-clean-up.php" instead of "wpacu.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "4.5")
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected44,371 lines of code in 227 files:
LanguageFilesBlank linesComment linesLines of code
PHP1817,0598,31929,957
CSS103273687,608
JavaScript119535124,962
Markdown39910953
JSON500389
TypeScript1154762236
SVG1313228
XML22025
Dockerfile12013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity91.84
▷ Minimum class complexity1.00
▷ Maximum class complexity688.00
Average method complexity7.61
▷ Minimum method complexity1.00
▷ Maximum method complexity97.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes55
▷ Abstract classes35.45%
▷ Concrete classes5294.55%
▷ Final classes00.00%
Methods732
▷ Static methods32143.85%
▷ Public methods61584.02%
▷ Protected methods10914.89%
▷ Private methods81.09%
Functions108
▷ Named functions109.26%
▷ Anonymous functions9890.74%
Constants188
▷ Global constants8947.34%
▷ Class constants9952.66%
▷ Public constants99100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/chosen/chosen-sprite@2x.png0.55KB0.56KB0.00%
assets/images/asset-cleanup-logo.png7.71KB8.38KB0.00%
assets/icons/premium-plugins/all-in-one-wp-migration-s3-extension.png5.07KB5.40KB0.00%
assets/icons/icon-incognito.png1.88KB1.93KB0.00%
assets/icons/themes/bridge.png0.52KB0.56KB0.00%