78% only-one-device-login-limit

Code Review | Only one device login limit

WordPress plugin Only one device login limit scored78%from 54 tests.

About plugin

  • Plugin page: only-one-device-l...
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Feb 4, 2022
  • Number of updates: 22
  • Update frequency: every 109.2 days
  • Top authors: codersantosh (77.27%)addonspress (27.27%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active /9,906 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: ▲0.13MB] [CPU: ▲1.76ms] Passed 4 tests

Analyzing server-side resources used by Only one device login limit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1545.66 ▲10.56
Dashboard /wp-admin3.43 ▲0.0947.55 ▼5.77
Posts /wp-admin/edit.php3.55 ▲0.1948.92 ▲4.11
Add New Post /wp-admin/post-new.php6.04 ▲0.1588.16 ▲2.62
Media Library /wp-admin/upload.php3.36 ▲0.1339.05 ▲6.07
Coder limit login /wp-admin/options-general.php?page=coder-limit-login-setting3.3336.26

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
coder-limit-login-options
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Only one device login limit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲11513.56 ▼1.098.57 ▲6.7939.13 ▼1.31
Dashboard /wp-admin2,203 ▲265.56 ▲0.0281.76 ▼19.8338.02 ▼6.37
Posts /wp-admin/edit.php2,111 ▲112.06 ▲0.0436.41 ▼1.6531.45 ▼4.71
Add New Post /wp-admin/post-new.php1,538 ▲1023.19 ▲0.04620.55 ▼47.5755.70 ▼2.00
Media Library /wp-admin/upload.php1,414 ▲144.18 ▲0.0093.68 ▼1.4843.19 ▲0.46
Coder limit login /wp-admin/options-general.php?page=coder-limit-login-setting8482.0122.2128.42

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/only-one-device-login-limit/only-one-device-login-limit.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/only-one-device-login-limit/inc/coder-admin-menu.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please describe screenshot #3 in only-one-device-login-limit/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

only-one-device-login-limit/only-one-device-login-limit.php Passed 13 tests

This is the main PHP file of "Only one device login limit" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Limit login to one device at a time for a user

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
There were no executable files found in this plugin388 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP297455371
JavaScript13117
CSS1010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity18.00
▷ Minimum class complexity6.00
▷ Maximum class complexity30.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 were not PNG files found in your plugin