84% clustercs-clear-cache

Code Review | ClusterCS Clear Cache

WordPress plugin ClusterCS Clear Cache scored84%from 54 tests.

About plugin

  • Plugin page: clustercs-clear-c...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 12, 2019
  • Latest release: Oct 8, 2019
  • Number of updates: 4
  • Update frequency: every 15.0 days
  • Top authors: clustercs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /574 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.00MB] [CPU: ▼123.40ms] Passed 4 tests

Analyzing server-side resources used by ClusterCS Clear Cache
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.75 ▼10.66
Dashboard /wp-admin3.33 ▼0.1053.42 ▼473.14
Posts /wp-admin/edit.php3.44 ▲0.0950.95 ▼5.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.24 ▼4.23
Media Library /wp-admin/upload.php3.25 ▲0.0239.46 ▼3.57

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
clear_error
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

ClusterCS Clear Cache: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,988 ▲22713.47 ▼0.8815.65 ▲14.0248.54 ▲8.13
Dashboard /wp-admin2,250 ▲705.74 ▲0.06104.38 ▲15.3081.01 ▲39.89
Posts /wp-admin/edit.php2,173 ▲762.06 ▲0.0438.71 ▲0.7135.34 ▲0.06
Add New Post /wp-admin/post-new.php1,746 ▲21822.49 ▼0.83773.66 ▲131.4854.92 ▲5.45
Media Library /wp-admin/upload.php1,467 ▲704.29 ▲0.11104.50 ▼14.5581.90 ▲33.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • clear_error
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% 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)
Even though everything seems fine, this is not 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/clustercs-clear-cache/inc/options.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

clustercs-clear-cache/clustercs.php 92% from 13 tests

"ClusterCS Clear Cache" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clustercs-clear-cache.php" instead of "clustercs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin633 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP37912299
JavaScript1380151
CSS1313142
Markdown121040
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods1275.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/error.png26.12KB9.20KB▼ 64.78%
img/check.png19.86KB7.86KB▼ 60.41%