68% wpcacheon

Code Review | WPCacheOn - WordPress Caching plugin

WordPress plugin WPCacheOn - WordPress Caching plugin scored 68% from 54 tests.

About plugin

  • Plugin page: wpcacheon
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Dec 9, 2020
  • Number of updates: 23
  • Update frequency: every 28.7 days
  • Top authors: jeffreycooper (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 6,889 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲1.62ms] Passed 4 tests

Server-side resources used by WPCacheOn - WordPress Caching plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.81 ▲5.35
Dashboard /wp-admin3.37 ▲0.0646.65 ▼4.77
Posts /wp-admin/edit.php3.42 ▲0.0647.48 ▲1.00
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.68 ▲8.97
Media Library /wp-admin/upload.php3.29 ▲0.0638.25 ▲4.89
WPCacheOn /wp-admin/options-general.php?page=wp-cache-on3.32488.20

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

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • There were 9 files (73.95KB) illegally modified outside of "wp-content/plugins/wpcacheon/" and "wp-content/uploads/"
    • (new file) wp-content/cache/wpcacheon/index.php
    • (modified) .htaccess
    • (new file) .htaccess.wco
    • (new file) wp-content/cache/wpcacheon/wp.com/wco.html.gz
    • (new file) wp-content/cache/wpcacheon/wp.com/wco-webp.html.gz
    • (new file) wp-content/advanced-cache.php
    • (modified) wp-config.php
    • (new file) wp-content/cache/wpcacheon/wp.com/wco.html
    • (new file) wp-content/cache/wpcacheon/wp.com/wco-webp.html
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
wp-cache-on
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WPCacheOn - WordPress Caching plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲13213.56 ▼1.175.68 ▲3.8437.77 ▼5.74
Dashboard /wp-admin2,230 ▲215.83 ▲0.9997.72 ▼0.2741.05 ▲3.15
Posts /wp-admin/edit.php2,110 ▲212.06 ▲0.0339.20 ▲3.5436.71 ▲3.89
Add New Post /wp-admin/post-new.php1,525 ▼817.51 ▼5.84606.41 ▼53.3049.48 ▼13.73
Media Library /wp-admin/upload.php1,406 ▲154.24 ▲0.07100.73 ▲1.0741.07 ▼5.28
WPCacheOn /wp-admin/options-general.php?page=wp-cache-on1,1425.63148.9951.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wpcacheon/uninstall.php+26
    Constant WCO_CACHE_DIR already defined
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpcacheon/includes/index.php
    • > /wp-content/plugins/wpcacheon/admin/index.php
    • > /wp-content/plugins/wpcacheon/public/index.php
    • > /wp-content/plugins/wpcacheon/index.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Cache_On' not found in wp-content/plugins/wpcacheon/admin/partials/settings.php:4
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpcacheon/includes/advanced-cache.php on line 27

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: cache, gzip, caching, minify, gtmetrix

wpcacheon/wp-cache-on.php 92% from 13 tests

"WPCacheOn - WordPress Caching plugin" version 2.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpcacheon.php" instead of "wp-cache-on.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,920 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP183788581,619
CSS21232241
JavaScript2105435
SVG20025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity20.45
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods93
▷ Static methods6670.97%
▷ Public methods6974.19%
▷ Protected methods00.00%
▷ Private methods2425.81%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants853.33%
▷ Class constants746.67%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) admin/images/logo.png23.65KB0.00KB▼ 100.00%
admin/images/icon.png1.41KB0.63KB▼ 55.13%
admin/images/rate.png2.19KB1.74KB▼ 20.49%