94% one-active-logged-in-session

Code Review | One Active session

WordPress plugin One Active session scored 94% from 54 tests.

About plugin

  • Plugin page: one-active-logged...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.2
  • WordPress version: 5.8.1
  • First release: Aug 8, 2015
  • Latest release: Aug 8, 2015
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: srapsware (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 1,100 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by One Active session
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.29 ▲10.94
Dashboard /wp-admin3.06 ▲0.0143.65 ▲1.48
Posts /wp-admin/edit.php3.11 ▲0.0144.84 ▲1.44
Add New Post /wp-admin/post-new.php5.42 ▼0.0187.73 ▼568.52
Media Library /wp-admin/upload.php3.00 ▼0.0032.26 ▼7.34

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for One Active session
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.68 ▲0.048.53 ▲0.0344.91 ▼3.59
Dashboard /wp-admin2,970 ▲365.90 ▼0.07136.20 ▼11.33116.03 ▼4.74
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0066.96 ▲1.4083.16 ▼6.53
Add New Post /wp-admin/post-new.php1,498 ▼17418.84 ▲0.15371.36 ▲23.02115.91 ▲14.08
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.02148.84 ▼9.52112.57 ▼14.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/one-active-logged-in-session/One-active-session.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
3 plugin tags: session, login, security

one-active-logged-in-session/One-active-session.php 85% from 13 tests

The principal PHP file in "One Active session" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("one-active-logged-in-session.php" instead of "One-active-session.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 271 characters long)

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
There were no executable files found in this plugin11 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP211011

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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