84% loggedin

Code Review | Loggedin - Limit Active Logins

WordPress plugin Loggedin - Limit Active Logins scored84%from 54 tests.

About plugin

  • Plugin page: loggedin
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Oct 28, 2022
  • Number of updates: 27
  • Update frequency: every 86.1 days
  • Top authors: joelcj91 (96.3%)is_code (7.41%)

Code review

54 tests

User reviews

93 reviews

Install metrics

9,000+ active /37,900 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.80ms] Passed 4 tests

A check of server-side resources used by Loggedin - Limit Active Logins
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.47 ▼0.31
Dashboard /wp-admin3.36 ▲0.0145.52 ▼13.93
Posts /wp-admin/edit.php3.47 ▲0.1248.97 ▲0.74
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.24 ▼5.68
Media Library /wp-admin/upload.php3.28 ▲0.0534.57 ▲3.67

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

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

Browser metrics Passed 4 tests

Loggedin - Limit Active Logins: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5313.94 ▼0.651.86 ▲0.0242.39 ▲1.74
Dashboard /wp-admin2,195 ▲185.66 ▲0.08100.47 ▲5.1642.06 ▲4.57
Posts /wp-admin/edit.php2,103 ▲61.99 ▼0.0538.26 ▲1.9035.46 ▼2.80
Add New Post /wp-admin/post-new.php1,528 ▲222.94 ▼0.08634.61 ▼41.2199.83 ▲45.69
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0896.31 ▼5.4145.55 ▲3.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/loggedin/includes/class-loggedin-admin.php
    • > /wp-content/plugins/loggedin/loggedin.php
    • > /wp-content/plugins/loggedin/includes/class-loggedin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
7 plugin tags: limit active logins, login, logout, login limit, active logins...

loggedin/loggedin.php 92% from 13 tests

The main PHP script in "Loggedin - Limit Active Logins" version 1.3.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin324 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP558325221
PO File22222103

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.30
Average class complexity10.50
▷ Minimum class complexity8.00
▷ Maximum class complexity13.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
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
There are no PNG files in this plugin