10% redis-object-cache

Code Review | Redis Object Cache

WordPress plugin Redis Object Cache scored10%from 54 tests.

About plugin

  • Plugin page: redis-object-cache
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Mar 30, 2014
  • Latest release: Mar 30, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: ericmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,964 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Compile error in wp-content/plugins/redis-object-cache/object-cache.php+23
    Cannot redeclare wp_cache_add() (previously declared in wp-includes/cache.php:41)

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.91ms] Passed 4 tests

This is a short check of server-side resources used by Redis Object Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.49 ▼3.14
Dashboard /wp-admin3.31 ▼0.0449.76 ▼16.40
Posts /wp-admin/edit.php3.36 ▲0.0050.42 ▲0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.18 ▼10.22
Media Library /wp-admin/upload.php3.23 ▲0.0037.81 ▼1.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Redis Object Cache
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.244.27 ▲2.5840.11 ▼5.04
Dashboard /wp-admin2,206 ▲155.90 ▲0.01106.89 ▲4.0738.09 ▼1.85
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0238.45 ▲5.4036.35 ▲1.56
Add New Post /wp-admin/post-new.php1,419 ▼9521.38 ▲3.78625.16 ▼156.4458.64 ▲6.31
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0292.33 ▼19.1640.40 ▼10.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/redis-object-cache/predis/bin/create-single-file.php
  • 448× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\PrefixableCommand' not found in wp-content/plugins/redis-object-cache/predis/lib/Predis/Command/StringIncrementBy.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\AbstractCommand' not found in wp-content/plugins/redis-object-cache/predis/lib/Predis/Command/PubSubUnsubscribe.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Protocol\\ResponseReaderInterface' not found in wp-content/plugins/redis-object-cache/predis/lib/Predis/Protocol/Text/TextResponseReader.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\CommandTestCase' not found in wp-content/plugins/redis-object-cache/predis/tests/Predis/Command/StringGetRangeTest.php:20
    • > PHP Fatal error
      Uncaught Predis\\Connection\\ConnectionException: Connection refused in wp-content/plugins/redis-object-cache/predis/lib/Predis/Connection/AbstractConnection.php:139
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\CommandTestCase' not found in wp-content/plugins/redis-object-cache/predis/tests/Predis/Command/ZSetRangeByScoreTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/redis-object-cache/predis/tests/PHPUnit/DistributionStrategyTestCase.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/redis-object-cache/predis/tests/Predis/ResponseErrorTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\CommandTestCase' not found in wp-content/plugins/redis-object-cache/predis/tests/Predis/Command/ListPopLastTest.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Option\\AbstractOption' not found in wp-content/plugins/redis-object-cache/predis/lib/Predis/Option/ClientPrefix.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: redis, object cache, cache

redis-object-cache/object-cache.php 92% from 13 tests

"Redis Object Cache" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("redis-object-cache.php" instead of "object-cache.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected26,262 lines of code in 488 files:
LanguageFilesBlank linesComment linesLines of code
PHP4777,87116,13025,286
Markdown63110856
XML2111259
JSON10025
INI16623
YAML10013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.85
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity1.32
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces18
Interfaces30
Traits0
Classes438
▷ Abstract classes143.20%
▷ Concrete classes42496.80%
▷ Final classes00.00%
Methods2,683
▷ Static methods271.01%
▷ Public methods2,15980.47%
▷ Protected methods47517.70%
▷ Private methods491.83%
Functions98
▷ Named functions1717.35%
▷ Anonymous functions8182.65%
Constants52
▷ Global constants1121.15%
▷ Class constants4178.85%
▷ Public constants41100.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
No PNG images were found in this plugin