10% wp-redis-cache

Code Review | Redis Cache

WordPress plugin Redis Cache scored10%from 54 tests.

About plugin

  • Plugin page: wp-redis-cache
  • Plugin version: 0.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jul 10, 2014
  • Latest release: Sep 29, 2014
  • Number of updates: 12
  • Update frequency: every 7.1 days
  • Top authors: krazybean (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,322 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Compile error in wp-content/plugins/wp-redis-cache/rc_core.php+313
    'continue' not in the 'loop' or 'switch' context

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.27ms] Passed 4 tests

Analyzing server-side resources used by Redis Cache
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.01 ▲4.14
Dashboard /wp-admin3.31 ▲0.0049.70 ▲0.26
Posts /wp-admin/edit.php3.36 ▲0.0046.97 ▼1.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.04 ▼29.73
Media Library /wp-admin/upload.php3.23 ▲0.0034.76 ▼2.59

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Redis Cache: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.28 ▼0.071.89 ▲0.1245.16 ▲0.70
Dashboard /wp-admin2,195 ▲155.58 ▼0.0993.57 ▲1.4241.56 ▲4.79
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0633.60 ▼3.3434.66 ▼0.13
Add New Post /wp-admin/post-new.php1,526 ▼923.36 ▲5.17663.91 ▼25.3055.91 ▼19.06
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.0192.48 ▼11.5742.89 ▲0.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      'continue' not in the 'loop' or 'switch' context in wp-content/plugins/wp-redis-cache/rc_core.php on line 313
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/wp-redis-cache/class/admin-page-framework.php:10539

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

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Dashboard Screenshot) image missing
  • Donate link: Invalid url: ""
The official readme.txt might help

wp-redis-cache/rc_core.php 92% from 13 tests

The principal PHP file in "Redis Cache" v. 0.2.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-redis-cache.php" instead of "rc_core.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin8,515 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42,2244,7048,462
CSS21040
Markdown19013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces5
Interfaces5
Traits0
Classes219
▷ Abstract classes2310.50%
▷ Concrete classes19689.50%
▷ Final classes00.00%
Methods789
▷ Static methods293.68%
▷ Public methods58774.40%
▷ Protected methods10012.67%
▷ Private methods10212.93%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants27.41%
▷ Class constants2592.59%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin