67% cc-minify

Code Review | CC-Minify

WordPress plugin CC-Minify scored67%from 54 tests.

About plugin

  • Plugin page: cc-minify
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2016
  • Latest release: Nov 15, 2016
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,383 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.76MB] [CPU: ▼49.51ms] Passed 4 tests

This is a short check of server-side resources used by CC-Minify
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.23 ▼1.2310.97 ▼28.63
Dashboard /wp-admin2.25 ▼1.0911.53 ▼52.61
Posts /wp-admin/edit.php2.25 ▼1.1012.55 ▼26.45
Add New Post /wp-admin/post-new.php2.25 ▼3.6311.41 ▼90.36
Media Library /wp-admin/upload.php2.25 ▼0.9712.99 ▼23.58
Minify /wp-admin/options-general.php?page=minify2.2512.61

Server storage [IO: ▲0.28MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • Illegal file modification detected: 3 files (232.34KB) outside of "wp-content/plugins/cc-minify/" and "wp-content/uploads/"
    • (new file) wp-content/cache/styles/print.css
    • (new file) wp-content/cache/styles/all.css
    • (new file) wp-content/cache/scripts/footer.js
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for CC-Minify
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.35 ▼1.064.62 ▲2.9241.89 ▼4.93
Dashboard /wp-admin2,225 ▲374.86 ▼0.03100.39 ▼16.7737.63 ▼7.50
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0039.71 ▼0.3636.17 ▲0.92
Add New Post /wp-admin/post-new.php1,542 ▲1423.35 ▲5.08673.86 ▲42.5151.57 ▲3.75
Media Library /wp-admin/upload.php1,407 ▲224.20 ▼0.0597.20 ▼3.8742.27 ▼2.91
Minify /wp-admin/options-general.php?page=minify8872.0327.6426.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/cc-minify/includes/files.php+58
    mkdir(): File exists
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=minify
    • > Warning in wp-content/plugins/cc-minify/includes/files.php+58
    mkdir(): File exists

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
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/cc-minify/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/cc-minify/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/cc-minify/vendor/matthiasmullie/minify/src/CSS.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/cc-minify/vendor/matthiasmullie/minify/src/Exceptions/IOException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/cc-minify/vendor/matthiasmullie/minify/src/JS.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Clearcode\\Minify\\Filterer' not found in wp-content/plugins/cc-minify/framework/plugin.php:27

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 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (**CC-Minify Settings** - Visit the 'Settings > Minify' page, select your preferred options and save them.)
  • Tags: There are too many tags (29 tag instead of maximum 10)
You can look at the official readme.txt

cc-minify/plugin.php 85% from 13 tests

The entry point to "CC-Minify" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please improve your description making it at least 10 characters long (currently 7 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cc-minify.php" instead of "plugin.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin1,871 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP365411,2071,688
JSON100111
PO File1293865
CSS1107

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.39
Average class complexity13.74
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes19
▷ Abstract classes421.05%
▷ Concrete classes1578.95%
▷ Final classes00.00%
Methods150
▷ Static methods4530.00%
▷ Public methods10771.33%
▷ Protected methods4026.67%
▷ Private methods32.00%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
1 PNG file occupies 0.11MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png109.99KB33.71KB▼ 69.35%