84% wp-redis-user-session-storage

Code Review | Redis User Session Storage

WordPress plugin Redis User Session Storage scored84%from 54 tests.

About plugin

  • Plugin page: wp-redis-user-ses...
  • Plugin version: 0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 13, 2022
  • Latest release: Jul 17, 2022
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: ethitter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

This is a short check of server-side resources used by Redis User Session Storage
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.01 ▼4.56
Dashboard /wp-admin3.32 ▼0.0343.98 ▼17.34
Posts /wp-admin/edit.php3.37 ▲0.0147.29 ▲1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.66 ▼10.87
Media Library /wp-admin/upload.php3.24 ▲0.0136.35 ▲1.54

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redis User Session Storage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.57 ▼0.431.81 ▲0.0142.53 ▼1.49
Dashboard /wp-admin2,206 ▲185.91 ▲0.10105.08 ▼15.0541.54 ▼3.61
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0339.19 ▲1.2434.47 ▼1.99
Add New Post /wp-admin/post-new.php1,542 ▲918.56 ▼4.63622.64 ▼77.2760.51 ▲2.35
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.0599.02 ▼3.2744.05 ▼1.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Session_Tokens' not found in wp-content/plugins/wp-redis-user-session-storage/inc/class-plugin.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: session tokens, user sessions, session storage

wp-redis-user-session-storage/wp-redis-user-session-storage.php Passed 13 tests

This is the main PHP file of "Redis User Session Storage" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
106 characters long description:
Store WordPress session tokens in Redis rather than the usermeta table. Requires the Redis PECL extension.

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
Success! There were no dangerous files found in this plugin206 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP359168206

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods15
▷ Static methods16.67%
▷ Public methods640.00%
▷ Protected methods960.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected