77% comet-cache

Code Review | Comet Cache

WordPress plugin Comet Cache scored77%from 54 tests.

About plugin

  • Plugin page: comet-cache
  • Plugin version: 170220...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2+
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Mar 9, 2022
  • Number of updates: 48
  • Update frequency: every 46.2 days
  • Top authors: raamdev (79.17%)clavaque (22.92%)

Code review

54 tests

User reviews

108 reviews

Install metrics

40,000+ active /481,404 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼0.24ms] Passed 4 tests

Server-side resources used by Comet Cache
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2943.28 ▲1.45
Dashboard /wp-admin3.55 ▲0.2548.27 ▼0.57
Posts /wp-admin/edit.php4.09 ▲0.7455.26 ▲11.31
Add New Post /wp-admin/post-new.php6.14 ▲0.2590.13 ▼2.93
Media Library /wp-admin/upload.php3.48 ▲0.2537.45 ▲1.10

Server storage [IO: ▲2.55MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Comet Cache
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.26 ▼1.114.67 ▲2.7644.29 ▼0.84
Dashboard /wp-admin2,245 ▲574.87 ▼0.01104.26 ▼14.9140.07 ▼3.56
Posts /wp-admin/edit.php2,135 ▲462.06 ▲0.0136.09 ▼0.2533.04 ▼2.28
Add New Post /wp-admin/post-new.php1,527 ▲1317.97 ▲0.35672.14 ▼26.7154.18 ▼2.69
Media Library /wp-admin/upload.php1,428 ▲434.26 ▲0.0398.58 ▼16.7040.86 ▼6.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 items
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/comet-cache/src/includes/uninstall.php
    • > /wp-content/plugins/comet-cache/src/includes/stub.php
    • > /wp-content/plugins/comet-cache/src/includes/api.php
    • > /wp-content/plugins/comet-cache/src/vendor/websharks/wp-php-rv/src/includes/check.php
    • > /wp-content/plugins/comet-cache/uninstall.php
    • > /wp-content/plugins/comet-cache/plugin.php
    • > /wp-content/plugins/comet-cache/src/includes/plugin.php
    • > /wp-content/plugins/comet-cache/comet-cache.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBase' not found in wp-content/plugins/comet-cache/src/includes/classes/Notes.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBaseAp' not found in wp-content/plugins/comet-cache/src/includes/classes/AdvancedCache.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBaseAp' not found in wp-content/plugins/comet-cache/src/includes/classes/Plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBase' not found in wp-content/plugins/comet-cache/src/includes/classes/VsUpgrades.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBase' not found in wp-content/plugins/comet-cache/src/includes/classes/FeedUtils.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\MenuPage' not found in wp-content/plugins/comet-cache/src/includes/classes/MenuPageOptions.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBase' not found in wp-content/plugins/comet-cache/src/includes/classes/AbsBaseAp.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBase' not found in wp-content/plugins/comet-cache/src/includes/classes/Actions.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WebSharks\\CometCache\\Classes\\AbsBase' not found in wp-content/plugins/comet-cache/src/includes/classes/MenuPage.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'WebSharks\\CometCache\\Interfaces\\Shared\cDebugConsts' not found in wp-content/plugins/comet-cache/src/includes/classes/AbsBase.php:11

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Tested up to: The plugin version is formatted incorrectly
You can look at the official readme.txt

comet-cache/comet-cache.php 92% from 13 tests

This is the main PHP file of "Comet Cache" version 170220..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "170220...")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin9,906 lines of code in 109 files:
LanguageFilesBlank linesComment linesLines of code
PHP961,7004,0478,669
SVG300789
JavaScript41360328
JSON100106
Markdown11010
CSS4424

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 190)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity27.01
▷ Minimum class complexity1.00
▷ Maximum class complexity190.00
Average method complexity7.50
▷ Minimum method complexity1.00
▷ Maximum method complexity190.00
Code structure
Namespaces7
Interfaces2
Traits60
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods308
▷ Static methods165.19%
▷ Public methods28993.83%
▷ Protected methods185.84%
▷ Private methods10.32%
Functions22
▷ Named functions1463.64%
▷ Anonymous functions836.36%
Constants68
▷ Global constants1826.47%
▷ Class constants5073.53%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
21 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/client-s/images/options-lite.png5.86KB5.87KB0.00%
src/client-s/images/clear.png0.69KB0.78KB0.00%
src/client-s/images/spinner.png0.41KB0.33KB▼ 20.28%
src/client-s/images/apache.png4.18KB4.16KB0.35%
src/client-s/images/opcache.png1.46KB1.45KB0.27%