84% wp-redis

Code Review | WP Redis

WordPress plugin WP Redis scored84%from 54 tests.

About plugin

  • Plugin page: wp-redis
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: Nov 27, 2023
  • Number of updates: 90
  • Update frequency: every 39.7 days
  • Top authors: danielbachhuber (74.44%)getpantheon (22.22%)Outlandish Josh (3.33%)mpvanwinkle77 (3.33%)

Code review

54 tests

User reviews

18 reviews

Install metrics

10,000+ active /658,305 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by WP Redis
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.40 ▼9.50
Dashboard /wp-admin3.32 ▼0.0345.83 ▼19.68
Posts /wp-admin/edit.php3.37 ▲0.0145.51 ▼1.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.64 ▲0.60
Media Library /wp-admin/upload.php3.24 ▲0.0132.74 ▼0.37

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Redis
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.69 ▲0.512.08 ▲0.1439.21 ▼4.83
Dashboard /wp-admin2,195 ▲175.61 ▼0.1294.03 ▼8.8442.95 ▼0.93
Posts /wp-admin/edit.php2,100 ▲211.97 ▼0.0538.88 ▲4.7736.13 ▲4.60
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.49677.45 ▲36.1353.03 ▲1.41
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0995.34 ▼1.6643.12 ▼1.27

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI' not found in wp-content/plugins/wp-redis/cli.php:245

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: cache, redis, plugin

wp-redis/wp-redis.php Passed 13 tests

The primary PHP file in "WP Redis" version 1.4.4 is used by WordPress to initiate all plugin functionality
107 characters long description:
WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis).

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
No dangerous file extensions were detected971 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3205736971

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity104.00
▷ Minimum class complexity26.00
▷ Maximum class complexity182.00
Average method complexity5.59
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods45
▷ Static methods12.22%
▷ Public methods3066.67%
▷ Protected methods1226.67%
▷ Private methods36.67%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin