62% wp-css-merge

Code Review | WP CSS Merge

WordPress plugin WP CSS Merge scored62%from 54 tests.

About plugin

  • Plugin page: wp-css-merge
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2019
  • Latest release: Oct 3, 2019
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: digitalapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /639 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.78MB] [CPU: ▼28.80ms] Passed 4 tests

Analyzing server-side resources used by WP CSS Merge
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.39 ▲0.34
Dashboard /wp-admin3.17 ▼0.1425.27 ▼26.54
Posts /wp-admin/edit.php3.17 ▼0.1923.45 ▼22.07
Add New Post /wp-admin/post-new.php3.17 ▼2.7224.09 ▼62.53
Media Library /wp-admin/upload.php3.17 ▼0.0627.55 ▼4.05
WP CSS Merge /wp-admin/options-general.php?page=wp-css-merge-page-general-settings3.1725.89

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
wp-css-merge-activate
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP CSS Merge
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.20 ▼1.471.49 ▼0.3539.99 ▼5.74
Dashboard /wp-admin2,219 ▲314.89 ▼0.02102.93 ▼12.9841.71 ▼4.87
Posts /wp-admin/edit.php2,102 ▲132.02 ▲0.0035.31 ▼1.7433.42 ▼2.74
Add New Post /wp-admin/post-new.php1,526 ▲722.94 ▼0.25625.93 ▼63.4261.82 ▲7.80
Media Library /wp-admin/upload.php1,398 ▲164.22 ▲0.0099.19 ▲2.0541.09 ▼3.15
WP CSS Merge /wp-admin/options-general.php?page=wp-css-merge-page-general-settings9232.0324.7629.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-css-merge-page-general-settings
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-css-merge/public/partials/wp-css-merge-public-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wp-css-merge/admin/partials/wp-css-merge-admin-page-sidebar.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/wp-css-merge/admin/partials/components/wp-css-merge-admin-field-toggle.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI ("digitalapps.co")
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-css-merge === )
The official readme.txt is a good inspiration

wp-css-merge/wp-css-merge.php Passed 13 tests

This is the main PHP file of "WP CSS Merge" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected919 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP18397635749
CSS3154111
JavaScript2155459

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods59
▷ Static methods58.47%
▷ Public methods5389.83%
▷ Protected methods00.00%
▷ Private methods610.17%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/adunblocker-pro@2x.png40.87KB16.32KB▼ 60.08%
admin/img/adunblocker-pro.png34.64KB14.19KB▼ 59.05%