57% unusedcss

Code Review | RapidLoad 2.1 - Speed Monster in One Plugin

WordPress plugin RapidLoad 2.1 - Speed Monster in One Plugin scored57%from 54 tests.

About plugin

  • Plugin page: unusedcss
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Nov 30, 2023
  • Number of updates: 146
  • Update frequency: every 7.7 days
  • Top authors: shakee93 (100%)

Code review

54 tests

User reviews

57 reviews

Install metrics

1,000+ active /135,883 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲2.68MB] [CPU: ▲11.17ms] Passed 4 tests

An overview of server-side resources used by RapidLoad 2.1 - Speed Monster in One Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.93 ▲2.4662.06 ▲18.61
Dashboard /wp-admin6.06 ▲2.7168.80 ▲6.25
Posts /wp-admin/edit.php6.15 ▲2.7962.72 ▲17.22
Add New Post /wp-admin/post-new.php8.77 ▲2.8998.84 ▲2.58
Media Library /wp-admin/upload.php5.99 ▲2.7658.56 ▲25.85

Server storage [IO: ▲17.57MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
Please fix the following
  • Illegal file modification detected: 6 files (6.70KB) outside of "wp-content/plugins/unusedcss/" and "wp-content/uploads/"
    • (new file) wp-content/cache/rapidload/uucss/.empty
    • (new file) wp-content/advanced-cache.php
    • (new file) wp-content/settings/rapidload/wp.com.php
    • (new file) wp-content/cache/rapidload/cpcss/.empty
    • (modified) wp-config.php
    • (new file) wp-content/cache/rapidload/min-css/.empty
Filesystem: 784 new files
Database: 5 new tables, 7 new options
New tables
wp_rapidload_job_data
wp_rapidload_job
wp_rapidload_job_optimizations
wp_rapidload_uucss_job
wp_rapidload_uucss_rule
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
rapidload_cache
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for RapidLoad 2.1 - Speed Monster in One Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,080 ▲31818.30 ▲3.5459.97 ▲58.2442.11 ▼1.11
Dashboard /wp-admin2,354 ▲1775.99 ▲0.41107.67 ▲3.7580.64 ▲36.38
Posts /wp-admin/edit.php2,282 ▲1822.65 ▲0.7042.58 ▼0.9134.99 ▼4.32
Add New Post /wp-admin/post-new.php6,505 ▲4,97018.94 ▼6.18898.31 ▲268.7844.15 ▼16.72
Media Library /wp-admin/upload.php1,568 ▲1684.53 ▲0.37108.67 ▲12.1383.26 ▲40.46

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/unusedcss/includes/RapidLoad_FileSystem.php+40
    rmdir(wp-content/cache/rapidload/uucss): Directory not empty
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_rapidload_job_optimizations
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • rapidload_cache
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/unusedcss/includes/admin/views/dashboard.html.php
  • 189× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\ode\ode' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/Node/ObjectExpression.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\\ES2019\\Features' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/ES2020/Features.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\\ES2016\\Features' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/ES2017/Features.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Formatter\\Base' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Formatter/PrettyPrint.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\ode\\Literal' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/Node/RegExpLiteral.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\ode\ode' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/Node/ModuleSpecifier.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/unusedcss/vendor/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\ode\ode' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/Node/IfStatement.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/unusedcss/vendor/sabberworm/php-css-parser/src/Property/Import.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Peast\\Syntax\ode\ode' not found in wp-content/plugins/unusedcss/vendor/mck89/peast/lib/Peast/Syntax/Node/LabeledStatement.php:17

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • License uri: Please fix this invalid URI: "[https://www.gnu.org/licenses/gpl-3.0.html](https://www.gnu.org/licenses/gpl-3.0.html)"
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

unusedcss/unusedcss.php Passed 13 tests

The principal PHP file in "RapidLoad 2.1 - Speed Monster in One Plugin" v. 2.2.0 is loaded by WordPress automatically on each request
95 characters long description:
Makes your site even faster and lighter by automatically removing Unused CSS from your website.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin95,935 lines of code in 671 files:
LanguageFilesBlank linesComment linesLines of code
PHP3208,78313,69432,493
JavaScript991,4881,26620,053
JSON230019,456
TypeScript1051,5071517,827
CSS301,2411196,629
Vuejs Component299533555,998
Markdown1541001,842
SVG371371,187
HTML6170310
XML46698
YAML17336
Bourne Shell2206

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 190)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity20.91
▷ Minimum class complexity1.00
▷ Maximum class complexity702.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity190.00
Code structure
Namespaces32
Interfaces9
Traits3
Classes283
▷ Abstract classes227.77%
▷ Concrete classes26192.23%
▷ Final classes00.00%
Methods1,951
▷ Static methods30915.84%
▷ Public methods1,63383.70%
▷ Protected methods24312.46%
▷ Private methods753.84%
Functions120
▷ Named functions32.50%
▷ Anonymous functions11797.50%
Constants120
▷ Global constants4638.33%
▷ Class constants7461.67%
▷ Public constants74100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/favicon.png2.43KB2.46KB0.00%