90% booster-sweeper

Code Review | Booster Sweeper: WordPress Asset Cleanup

WordPress plugin Booster Sweeper: WordPress Asset Cleanup scored90%from 54 tests.

About plugin

  • Plugin page: booster-sweeper
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 29, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 15
  • Update frequency: every 25.3 days
  • Top authors: maxpressy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲1.50MB] [CPU: ▲14.08ms] Passed 4 tests

This is a short check of server-side resources used by Booster Sweeper: WordPress Asset Cleanup
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.00 ▲1.5362.93 ▲21.83
Dashboard /wp-admin4.83 ▲1.5257.58 ▲5.23
Posts /wp-admin/edit.php4.92 ▲1.5677.50 ▲29.15
Add New Post /wp-admin/post-new.php7.38 ▲1.49102.79 ▲10.77
Media Library /wp-admin/upload.php4.69 ▲1.4653.35 ▲18.50

Server storage [IO: ▲1.88MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 176 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
_booster_sweeper_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Booster Sweeper: WordPress Asset Cleanup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7114.70 ▲0.261.77 ▲0.0441.95 ▼1.40
Dashboard /wp-admin2,238 ▲645.57 ▲0.0386.35 ▼6.1240.51 ▲1.22
Posts /wp-admin/edit.php2,341 ▲2383.58 ▲1.6280.44 ▲42.7835.59 ▼0.80
Add New Post /wp-admin/post-new.php1,680 ▲15423.36 ▲0.16664.16 ▲58.1148.82 ▼0.71
Media Library /wp-admin/upload.php1,443 ▲494.08 ▼0.0881.90 ▼17.8943.16 ▲0.83
General /wp-admin/admin.php?page=booster-sweeper-settings#tab=general1,4013.4061.4944.36
Manage (Frontend) /wp-admin/admin.php?page=booster-sweeper-settings#tab=manage-frontend1,3813.4254.6934.49
Documentation /wp-admin/admin.php?page=booster-sweeper-settings#tab=documentation1,4063.8559.2936.77
Manage (Backend) /wp-admin/admin.php?page=booster-sweeper-settings#tab=manage-backend1,3843.3953.2132.37
Assets (Options) /wp-admin/admin.php?page=booster-sweeper-settings#tab=assets-options1,3853.7252.5033.23
Import/Export /wp-admin/admin.php?page=booster-sweeper-settings#tab=import-export1,3853.7357.1931.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • _booster_sweeper_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: assets, performance, seo, dequeue, pagespeed...

booster-sweeper/booster-sweeper.php 92% from 13 tests

"Booster Sweeper: WordPress Asset Cleanup" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin39,308 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP973,6281,70115,620
JavaScript61,3045166,633
PO File203,1983,5916,500
Sass1697035,674
CSS53765154,879
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity25.22
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity7.20
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods250
▷ Static methods4819.20%
▷ Public methods250100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%