90% pj-page-cache-red

Code Review | Redis Page Cache

WordPress plugin Redis Page Cache scored90%from 54 tests.

About plugin

  • Plugin page: pj-page-cache-red
  • Plugin version: 0.8.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Apr 1, 2020
  • Number of updates: 17
  • Update frequency: every 89.4 days
  • Top authors: pressjitsu (58.82%)soulseekah (47.06%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /14,964 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

A check of server-side resources used by Redis Page Cache
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.46 ▼7.82
Dashboard /wp-admin3.31 ▲0.0047.73 ▼0.03
Posts /wp-admin/edit.php3.36 ▲0.0048.46 ▼1.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.38 ▼1.63
Media Library /wp-admin/upload.php3.23 ▲0.0038.95 ▲4.32

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

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

Browser metrics Passed 4 tests

Redis Page Cache: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.58 ▼0.831.66 ▼0.1542.89 ▲2.62
Dashboard /wp-admin2,209 ▲215.89 ▲1.0096.19 ▼5.4142.75 ▼0.44
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0339.24 ▼4.7435.49 ▲0.07
Add New Post /wp-admin/post-new.php1,533 ▼023.02 ▲1.91657.07 ▲29.9854.94 ▲0.20
Media Library /wp-admin/upload.php1,391 ▲34.11 ▼0.15108.26 ▲3.7648.87 ▲0.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: cache, redis, caching, performance

pj-page-cache-red/redis-page-cache.php 92% from 13 tests

The main PHP script in "Redis Page Cache" version 0.8.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pj-page-cache-red.php" instead of "redis-page-cache.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin436 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2126146436

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity120.00
▷ Minimum class complexity120.00
▷ Maximum class complexity120.00
Average method complexity6.95
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods20100.00%
▷ Public methods1260.00%
▷ Protected methods00.00%
▷ Private methods840.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin