78% wp-super-minify

Code Review | WP Super Minify

WordPress plugin WP Super Minify scored78%from 54 tests.

About plugin

  • Plugin page: wp-super-minify
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2014
  • Latest release: Sep 5, 2023
  • Number of updates: 105
  • Update frequency: every 31.0 days
  • Top authors: dipakcg (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

10,000+ active /304,843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.86ms] Passed 4 tests

A check of server-side resources used by WP Super Minify
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.28 ▼8.44
Dashboard /wp-admin3.34 ▲0.0449.84 ▲1.03
Posts /wp-admin/edit.php3.39 ▲0.0348.99 ▼1.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.52 ▲1.62
Media Library /wp-admin/upload.php3.27 ▲0.0333.29 ▼2.41
WP Super Minify /wp-admin/options-general.php?page=wp-super-minify3.2329.34

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 72 new files
Database: no new tables, 9 new options
New WordPress options
wpsmy_combine_js
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
wpsmy_combine_css
wpsmy_plugin_version
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Super Minify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,744 ▲914.48 ▼0.101.75 ▼0.1638.14 ▼4.76
Dashboard /wp-admin2,212 ▲374.86 ▼0.09107.06 ▼15.7939.82 ▼3.56
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0435.52 ▼4.4832.19 ▼1.09
Add New Post /wp-admin/post-new.php1,533 ▼923.23 ▲5.20639.48 ▲9.5048.87 ▼2.38
Media Library /wp-admin/upload.php1,394 ▲34.25 ▲0.0594.23 ▼5.9241.92 ▼2.69
WP Super Minify /wp-admin/options-general.php?page=wp-super-minify8932.0524.6729.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • wpsmy_combine_js
    • wpsmy_combine_css
    • widget_recent-comments

Smoke tests 50% from 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)
Good news, no errors were detected

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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-super-minify/includes/min/server-info.php
    • > /wp-content/plugins/wp-super-minify/includes/min/index.php
    • > /wp-content/plugins/wp-super-minify/includes/min/builder/index.php
    • > /wp-content/plugins/wp-super-minify/includes/min/builder/ocCheck.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/wp-super-minify/includes/min/lib/Minify/Controller/Page.php:14
    • > PHP Fatal error
      The script "class.JavaScriptPacker.php" is required. Please see: http://code.google.com/p/minify/source/browse/trunk/min/lib/Minify/Packer.php in wp-content/plugins/wp-super-minify/includes/min/lib/Minify/Packer.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/wp-super-minify/includes/min/lib/Minify/Controller/MinApp.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/wp-super-minify/wp-super-minify.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/wp-super-minify/includes/min/lib/Minify/Controller/Groups.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/wp-super-minify/includes/min/lib/Minify/Controller/Files.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Minify_Controller_Base' not found in wp-content/plugins/wp-super-minify/includes/min/lib/Minify/Controller/Version1.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #2, #3 in wp-super-minify/assets to your readme.txt
You can take inspiration from this readme.txt

wp-super-minify/wp-super-minify.php Passed 13 tests

The main PHP file in "WP Super Minify" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Minifies, caches and combine inline JavaScript and CSS files to improve page load time.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected7,524 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,3324,3956,908
JavaScript6372315
Java17477231
CSS36570

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 155)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity30.57
▷ Minimum class complexity1.00
▷ Maximum class complexity281.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity155.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes00.00%
Methods321
▷ Static methods7021.81%
▷ Public methods20162.62%
▷ Protected methods5517.13%
▷ Private methods6520.25%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants138
▷ Global constants10576.09%
▷ Class constants3323.91%
▷ Public constants33100.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
7 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wpsmy-support-this-16x16.png0.41KB0.41KB0.48%
assets/images/wpsmy-icon-24x24.png19.20KB1.42KB▼ 92.58%
assets/images/wpsmy-github-16x16.png0.25KB0.32KB0.00%
assets/images/wpsmy-rate-this-16x16.png0.68KB0.82KB0.00%
assets/images/wpsmy-other-plugins-16x16.png0.49KB0.56KB0.00%