84% ban-double-login

Code Review | Ban Double Login

WordPress plugin Ban Double Login scored 84% from 54 tests.

About plugin

  • Plugin page: ban-double-login
  • Plugin version: 1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.3
  • WordPress version: 6.3.1
  • First release: Jun 21, 2018
  • Latest release: Nov 30, 2020
  • Number of updates: 7
  • Update frequency: every 127.7 days
  • Top authors: minkapi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Ban Double Login
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.19 ▼1.91
Dashboard /wp-admin3.31 ▲0.0045.37 ▲2.03
Posts /wp-admin/edit.php3.36 ▲0.0046.71 ▲1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.03 ▼11.98
Media Library /wp-admin/upload.php3.23 ▲0.0035.05 ▲5.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ban Double Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.101.85 ▲0.1343.49 ▲0.70
Dashboard /wp-admin2,206 ▲174.88 ▼0.0595.72 ▼21.6341.10 ▲0.40
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0135.76 ▼0.1432.40 ▼1.20
Add New Post /wp-admin/post-new.php1,533 ▲1323.45 ▲0.41656.65 ▲42.7749.94 ▼3.30
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0392.78 ▼3.5743.75 ▼0.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ban-double-login/ban-double-login.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: double-login, member-sites, login

ban-double-login/ban-double-login.php Passed 13 tests

The main file in "Ban Double Login" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
33 characters long description:
This plugin forbids double login.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected22 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP241422

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected