73% sessions

Code Review | Sessions

WordPress plugin Sessions scored73%from 54 tests.

About plugin

  • Plugin page: sessions
  • Plugin version: 2.12.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Oct 25, 2023
  • Number of updates: 26
  • Update frequency: every 50.4 days
  • Top authors: PierreLannoy (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active /12,680 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.46MB] [CPU: ▲11.08ms] Passed 4 tests

This is a short check of server-side resources used by Sessions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.82 ▲1.3555.74 ▲23.04
Dashboard /wp-admin4.85 ▲1.5062.49 ▲4.22
Posts /wp-admin/edit.php4.91 ▲1.5465.03 ▲23.59
Add New Post /wp-admin/post-new.php7.39 ▲1.5093.71 ▼0.24
Media Library /wp-admin/upload.php4.72 ▲1.4851.47 ▲17.28
Analytics /wp-admin/admin.php?page=perfopsone-analytics4.6955.21
Sessions /wp-admin/admin.php?page=pose-viewer5.1647.88
Sessions /wp-admin/admin.php?page=pose-settings4.9045.66
Tools /wp-admin/admin.php?page=perfopsone-tools4.6941.76
Sessions /wp-admin/admin.php?page=pose-manager5.0249.00
Control Center /wp-admin/admin.php?page=perfopsone-dashboard4.7360.79

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 471 new files
Database: 1 new table, 6 new options
New tables
wp_sessions_statistics
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Sessions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲6214.23 ▼0.161.72 ▼0.2442.64 ▼1.69
Dashboard /wp-admin2,239 ▲615.57 ▼0.0494.93 ▼23.3742.58 ▲1.20
Posts /wp-admin/edit.php2,144 ▲412.03 ▲0.0335.52 ▼5.1332.82 ▼3.45
Add New Post /wp-admin/post-new.php1,551 ▲2323.47 ▲0.37676.48 ▲65.2561.90 ▼2.36
Media Library /wp-admin/upload.php1,447 ▲474.27 ▲0.1298.08 ▲5.1243.54 ▲3.51
Analytics /wp-admin/admin.php?page=perfopsone-analytics8831.9923.4927.46
Sessions /wp-admin/admin.php?page=pose-viewer1,3923.3376.1363.21
Sessions /wp-admin/admin.php?page=pose-settings1,1562.0123.8335.66
Tools /wp-admin/admin.php?page=perfopsone-tools8832.0022.9620.99
Sessions /wp-admin/admin.php?page=pose-manager1,2502.0725.4933.93
Control Center /wp-admin/admin.php?page=perfopsone-dashboard1,0522.0133.5544.79

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pose-manager
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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/sessions/public/partials/sessions-public-display.php
  • 37× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Trait 'cebe\\markdownparser\\block\\CodeTrait' not found in wp-content/plugins/sessions/includes/libraries/markdown/block/FencedCodeTrait.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/sessions/includes/libraries/psr/http-message/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/sessions/includes/libraries/psr/http-client/RequestExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'cebe\\markdownparser\\MarkdownParser' not found in wp-content/plugins/sessions/includes/libraries/markdown/MarkdownExtra.php:17
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/sessions/includes/features/class-sessions.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/sessions/perfopsone/class-upgraderskin.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/sessions/includes/libraries/psr/http-message/RequestInterface.php:24
    • > PHP Warning
      require_once(ABSPATHwp-load.php): failed to open stream: No such file or directory in wp-content/plugins/sessions/perfopsone/class-installer.php on line 12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/sessions/includes/libraries/decalog-sdk/EventsLogger.php:22
    • > PHP Warning
      Use of undefined constant POSE_VENDOR_DIR - assumed 'POSE_VENDOR_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/sessions/includes/libraries/class-libraries.php on line 64

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
5 plugin tags: session, authentication, role, protection, login

sessions/sessions.php Passed 13 tests

"Sessions" version 2.12.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
104 characters long description:
Powerful sessions manager for WordPress with sessions limiter and full analytics reporting capabilities.

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
There were no executable files found in this plugin38,185 lines of code in 439 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121,9262,30520,395
PHP1201,4007,96911,135
SVG285014,251
CSS1328521,920
Markdown71680431
JSON20053

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity18.72
▷ Minimum class complexity1.00
▷ Maximum class complexity259.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces15
Interfaces13
Traits15
Classes74
▷ Abstract classes22.70%
▷ Concrete classes7297.30%
▷ Final classes00.00%
Methods711
▷ Static methods25636.01%
▷ Public methods51872.86%
▷ Protected methods11516.17%
▷ Private methods7810.97%
Functions27
▷ Named functions829.63%
▷ Anonymous functions1970.37%
Constants54
▷ Global constants4379.63%
▷ Class constants1120.37%
▷ Public constants11100.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 files were detected