74% cache-enabler

Code Review | Cache Enabler

WordPress plugin Cache Enabler scored74%from 54 tests.

About plugin

  • Plugin page: cache-enabler
  • Plugin version: 1.8.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: May 19, 2023
  • Number of updates: 222
  • Update frequency: every 12.5 days
  • Top authors: keycdn (100%)

Code review

54 tests

User reviews

126 reviews

Install metrics

100,000+ active /2,259,126 total downloads

Benchmarks

Plugin footprint 65% 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.54MB] [CPU: ▼3.19ms] Passed 4 tests

Server-side resources used by Cache Enabler
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6142.03 ▼0.11
Dashboard /wp-admin3.75 ▲0.4549.13 ▼0.04
Posts /wp-admin/edit.php3.97 ▲0.6152.84 ▲3.64
Add New Post /wp-admin/post-new.php6.44 ▲0.5585.82 ▼16.24
Media Library /wp-admin/upload.php3.78 ▲0.5541.93 ▲9.55
Cache Enabler /wp-admin/options-general.php?page=cache-enabler3.7435.49

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

Input-output and database impact of this plugin
Just a few items left to fix
  • Illegal file modification detected: 3 files (7.20KB) outside of "wp-content/plugins/cache-enabler/" and "wp-content/uploads/"
    • (modified) wp-config.php
    • (new file) wp-content/advanced-cache.php
    • (new file) wp-content/settings/cache-enabler/wp.com.php
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
cache_enabler
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Cache Enabler: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.16 ▼1.251.67 ▲0.0742.52 ▼0.23
Dashboard /wp-admin2,229 ▲375.87 ▲0.91105.37 ▲1.9542.18 ▼2.73
Posts /wp-admin/edit.php2,106 ▲172.01 ▼0.0238.24 ▲0.6133.96 ▼3.20
Add New Post /wp-admin/post-new.php1,526 ▲723.26 ▲0.02649.40 ▼32.0157.22 ▲1.59
Media Library /wp-admin/upload.php1,399 ▲144.20 ▲0.0194.30 ▼6.8041.36 ▼2.37
Cache Enabler /wp-admin/options-general.php?page=cache-enabler1,0482.0623.3935.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/cache-enabler/inc/cache_enabler_disk.class.php+1356
    rmdir(wp-content): Directory not empty
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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/cache-enabler/constants.php on line 16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cache-enabler/constants.php on line 18
    • > 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/cache-enabler/constants.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: gzip, caching, webp, performance, mobile...

cache-enabler/cache-enabler.php Passed 13 tests

The main PHP script in "Cache Enabler" version 1.8.13 is automatically included on every request by WordPress
41 characters long description:
Simple and fast WordPress caching plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,526 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP78031,8662,497
CSS26129

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity136.50
▷ Minimum class complexity10.00
▷ Maximum class complexity238.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes375.00%
Methods155
▷ Static methods15298.06%
▷ Public methods11171.61%
▷ Protected methods00.00%
▷ Private methods4428.39%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin