84% debloat

Code Review | Debloat - Remove Unused CSS, Optimize JS

WordPress plugin Debloat - Remove Unused CSS, Optimize JS scored84%from 54 tests.

About plugin

  • Plugin page: debloat
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 21, 2021
  • Latest release: Nov 3, 2023
  • Number of updates: 27
  • Update frequency: every 29.9 days
  • Top authors: asadkn (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

20,000+ active /120,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.86MB] [CPU: ▼1.44ms] Passed 4 tests

This is a short check of server-side resources used by Debloat - Remove Unused CSS, Optimize JS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2736.19 ▼3.36
Dashboard /wp-admin4.41 ▲1.0753.73 ▼4.64
Posts /wp-admin/edit.php4.43 ▲1.0855.49 ▲9.01
Add New Post /wp-admin/post-new.php6.93 ▲1.0588.78 ▼5.34
Media Library /wp-admin/upload.php4.27 ▲1.0445.31 ▲7.59
Debloat: Optimize /wp-admin/options-general.php?page=debloat_options4.8253.59
Optimize JS /wp-admin/admin.php?page=debloat_options_js4.7343.52
Delete Cache /wp-admin/admin.php?page=debloat-delete-cache4.1737.90
General Settings /wp-admin/admin.php?page=debloat_options_general4.6142.44

Server storage [IO: ▲3.34MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 470 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Debloat - Remove Unused CSS, Optimize JS: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8314.39 ▼0.012.06 ▲0.2538.42 ▼5.44
Dashboard /wp-admin2,207 ▲335.59 ▲0.0485.96 ▼7.9940.16 ▼3.74
Posts /wp-admin/edit.php2,115 ▲152.04 ▲0.0837.72 ▲2.0635.61 ▼0.86
Add New Post /wp-admin/post-new.php1,536 ▲1023.33 ▲0.16687.69 ▼10.1648.80 ▼19.09
Media Library /wp-admin/upload.php1,409 ▲94.31 ▲0.1799.74 ▼16.7343.01 ▼5.86
Debloat: Optimize /wp-admin/options-general.php?page=debloat_options1,5902.3647.2739.81
Optimize JS /wp-admin/admin.php?page=debloat_options_js1,2132.1437.4236.29
Delete Cache /wp-admin/admin.php?page=debloat-delete-cache6691.336.8013.51
General Settings /wp-admin/admin.php?page=debloat_options_general9402.2328.6332.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 80× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/debloat/vendor/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Parsing\\UnexpectedTokenException' not found in wp-content/plugins/debloat/vendor/sabberworm/php-css-parser/src/Parsing/UnexpectedEOFException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/debloat/vendor/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/debloat/vendor/sabberworm/php-css-parser/src/Property/Import.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/debloat/vendor/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/debloat/vendor/cmb2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/debloat/vendor/sabberworm/php-css-parser/src/Value/CSSFunction.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/debloat/vendor/sabberworm/php-css-parser/src/Property/Charset.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\CSSFunction' not found in wp-content/plugins/debloat/vendor/sabberworm/php-css-parser/src/Value/Color.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Parsing\\SourceException' not found in wp-content/plugins/debloat/vendor/sabberworm/php-css-parser/src/Parsing/OutputException.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: speed, uncss, optimize, performance

debloat/debloat.php Passed 13 tests

The principal PHP file in "Debloat - Remove Unused CSS, Optimize JS" v. 1.2.5 is loaded by WordPress automatically on each request
68 characters long description:
Remove Unused CSS, Optimize CSS, Optimize JS and speed up your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin57,190 lines of code in 311 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP1443,98911,37115,677
CSS132691,2054,673
JavaScript134486592,003
Sass17306291,427
Markdown21060607
JSON100472
XML1208

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.01
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces22
Interfaces4
Traits0
Classes141
▷ Abstract classes1913.48%
▷ Concrete classes12286.52%
▷ Final classes00.00%
Methods1,090
▷ Static methods15113.85%
▷ Public methods92184.50%
▷ Protected methods14613.39%
▷ Private methods232.11%
Functions88
▷ Named functions4045.45%
▷ Anonymous functions4854.55%
Constants25
▷ Global constants416.00%
▷ Class constants2184.00%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
vendor/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%