10% cache-performance

Code Review | WordPress Cache and CDN plugin - fast, easy to use, instant results

WordPress plugin WordPress Cache and CDN plugin - fast, easy to use, instant results scored10%from 54 tests.

About plugin

  • Plugin page: cache-performance
  • Plugin version: 1.6.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Mar 26, 2020
  • Number of updates: 42
  • Update frequency: every 25.8 days
  • Top authors: pigeonhut (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

500+ active /36,996 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/cache-performance/lib/class-optimisationio-cacheenabler.php+174
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.64MB] [CPU: ▼9.02ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Cache and CDN plugin - fast, easy to use, instant results
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3132.60 ▼8.53
Dashboard /wp-admin4.25 ▲0.9552.43 ▲4.23
Posts /wp-admin/edit.php4.31 ▲0.9550.46 ▲0.73
Add New Post /wp-admin/post-new.php6.24 ▲0.3669.38 ▼32.49
Media Library /wp-admin/upload.php4.18 ▲0.9542.49 ▲9.66

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

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification found: 2 files (7.40KB) outside of "wp-content/plugins/cache-performance/" and "wp-content/uploads/"
    • (new file) wp-content/advanced-cache.php
    • (modified) wp-config.php
Filesystem: 38 new files
Database: 2 new tables, 8 new options
New tables
wp_wp_cache_gravatars
wp_wp_optimisation_sizes_info
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
Optimisationio_rev3a_cdnsettings
cache
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Cache and CDN plugin - fast, easy to use, instant results
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11313.23 ▼1.521.86 ▲0.0643.46 ▼4.14
Dashboard /wp-admin2,246 ▲555.84 ▲0.9198.88 ▼1.9139.64 ▼0.84
Posts /wp-admin/edit.php2,120 ▲282.06 ▲0.0833.10 ▼7.6333.40 ▼1.66
Add New Post /wp-admin/post-new.php1,560 ▲4623.11 ▲5.43581.11 ▼18.5154.13 ▲6.02
Media Library /wp-admin/upload.php1,425 ▲374.18 ▼0.0292.21 ▼2.4743.76 ▲1.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/cache-performance/lib/class-optimisationio-cacheenabler.php+124
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 1 table
    • wp_wp_optimisation_sizes_info
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-comments
    • Optimisationio_rev3a_cdnsettings
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • cache

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Optimisationio_Dashboard' not found in wp-content/plugins/cache-performance/views/optimisationio-dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/cache-performance/lib/class-optimisationio-upgrader-skin.php:5
    • > 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-performance/lib/class-optimisationio-upgrader-skin.php on line 3
    • > 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-performance/advanced-cache.php on line 36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cache-performance/optimisationio.php:22
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/cache-performance/lib/class-optimisationio-upgrader-skin.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/class-wp-upgrader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cache-performance/lib/class-optimisationio-upgrader-skin.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

cache-performance/optimisationio.php 92% from 13 tests

Analyzing the main PHP file in "WordPress Cache and CDN plugin - fast, easy to use, instant results" version 1.6.12
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cache-performance.php" instead of "optimisationio.php")

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 detected8,332 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP181,4471,1756,489
CSS2170261,034
JavaScript319234809

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity71.87
▷ Minimum class complexity1.00
▷ Maximum class complexity272.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods256
▷ Static methods11745.70%
▷ Public methods20580.08%
▷ Protected methods51.95%
▷ Private methods4617.97%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants736.84%
▷ Class constants1263.16%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-optimisation-line.png0.85KB1.07KB0.00%
images/icon-support.png0.76KB0.76KB0.13%
images/logo-optimisation.png3.97KB3.99KB0.00%