74% wp-session-manager

Code Review | WP Session Manager

WordPress plugin WP Session Manager scored74%from 54 tests.

About plugin

  • Plugin page: wp-session-manager
  • Plugin version: 4.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.1.1
  • WordPress version: 6.3.1
  • First release: Dec 2, 2012
  • Latest release: Mar 31, 2019
  • Number of updates: 22
  • Update frequency: every 105.0 days
  • Top authors: ericmann (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

3,000+ active /66,193 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.20MB] [CPU: ▼3.91ms] Passed 4 tests

Analyzing server-side resources used by WP Session Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.00 ▲4.72
Dashboard /wp-admin3.55 ▲0.2048.25 ▼7.66
Posts /wp-admin/edit.php3.60 ▲0.2447.78 ▲4.07
Add New Post /wp-admin/post-new.php6.07 ▲0.1885.28 ▼16.55
Media Library /wp-admin/upload.php3.41 ▲0.1836.81 ▲4.50

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 121 new files
Database: 1 new table, 6 new options
New tables
wp_sm_sessions
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP Session Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.42 ▼0.141.68 ▲0.0745.30 ▲5.17
Dashboard /wp-admin2,195 ▲145.67 ▲0.0084.54 ▼11.6540.01 ▼6.43
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0334.19 ▼1.1036.85 ▲4.67
Add New Post /wp-admin/post-new.php1,536 ▲823.17 ▲0.30670.61 ▲8.4054.41 ▼2.53
Media Library /wp-admin/upload.php1,394 ▼64.20 ▲0.0193.83 ▼6.3941.02 ▼6.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_sm_sessions
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 28× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-session-manager/vendor/paragonie/random_compat/tests/unit_with_basedir/RandomBytesTest.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'EAMann\\Sessionz\\Handler' not found in wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Handlers/DefaultHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-session-manager/vendor/paragonie/random_compat/tests/unit/UtilityTest.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'EAMann\\Sessionz\\Handler' not found in wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/php/Handlers/BaseHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/test/phpunit/Objects/MemoryItemTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Crypto' not found in wp-content/plugins/wp-session-manager/vendor/defuse/php-encryption/src/RuntimeTests.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-session-manager/vendor/ericmann/sessionz/test/phpunit/Handlers/MemoryHandlerTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-session-manager/vendor/paragonie/random_compat/tests/unit_with_basedir/RandomIntTest.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-session-manager/vendor/paragonie/random_compat/tests/unit/RandomIntTest.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-session-manager/wp-session-manager.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
1 plugin tags: session

wp-session-manager/wp-session-manager.php Passed 13 tests

The main PHP script in "WP Session Manager" version 4.2.0 is automatically included on every request by WordPress
33 characters long description:
Session management for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,006 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP707982,8484,045
Markdown2186902,398
JSON600325
XML41987
YAML310077
Bourne Shell28750
make19424

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.42
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces10
Interfaces1
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes714.89%
Methods210
▷ Static methods6229.52%
▷ Public methods18286.67%
▷ Protected methods136.19%
▷ Private methods157.14%
Functions53
▷ Named functions3260.38%
▷ Anonymous functions2139.62%
Constants34
▷ Global constants411.76%
▷ Class constants3088.24%
▷ Public constants30100.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