84% mc-w3tc-minify-helper

Code Review | W3TC Minify Helper

WordPress plugin W3TC Minify Helper scored84%from 54 tests.

About plugin

  • Plugin page: mc-w3tc-minify-he...
  • Plugin version: 1.0.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 6.3.1
  • First release: Feb 14, 2019
  • Latest release: Feb 15, 2019
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: Magenta Cuda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /636 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
Installer ran successfully

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

Server-side resources used by W3TC Minify Helper
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.69 ▼4.45
Dashboard /wp-admin3.34 ▲0.0447.33 ▼1.11
Posts /wp-admin/edit.php3.46 ▲0.1046.81 ▼3.64
Add New Post /wp-admin/post-new.php5.93 ▲0.0390.96 ▼3.44
Media Library /wp-admin/upload.php3.27 ▲0.0335.33 ▼1.84

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for W3TC Minify Helper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7614.79 ▲0.411.69 ▼0.0941.19 ▲3.02
Dashboard /wp-admin2,217 ▲314.86 ▼0.04110.81 ▼5.6941.40 ▼1.95
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0440.41 ▲4.1636.06 ▼1.31
Add New Post /wp-admin/post-new.php1,539 ▲623.16 ▼0.09622.62 ▼65.2149.53 ▼6.37
Media Library /wp-admin/upload.php1,390 ▲24.25 ▲0.0698.64 ▲1.2041.57 ▲0.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc-w3tc-minify-helper/w3tc-minify-helper.php:283

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: minify, javascript, w3tc

mc-w3tc-minify-helper/w3tc-minify-helper.php 92% from 13 tests

The main PHP file in "W3TC Minify Helper" ver. 1.0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mc-w3tc-minify-helper.php" instead of "w3tc-minify-helper.php")

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
Success! There were no dangerous files found in this plugin186 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12103184
INI1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.67
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods240.00%
▷ Protected methods00.00%
▷ Private methods360.00%
Functions13
▷ Named functions00.00%
▷ Anonymous functions13100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected