84% wp-bouncer

Code Review | WP Bouncer - Limit Simultaneous Logins

WordPress plugin WP Bouncer - Limit Simultaneous Logins scored 84% from 54 tests.

About plugin

  • Plugin page: wp-bouncer
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2013
  • Latest release: Apr 16, 2023
  • Number of updates: 20
  • Update frequency: every 177.7 days
  • Top authors: strangerstudios (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

4,000+ active / 65,099 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲5.75ms] Passed 4 tests

A check of server-side resources used by WP Bouncer - Limit Simultaneous Logins
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0654.22 ▲10.65
Dashboard /wp-admin3.36 ▲0.0554.86 ▲9.04
Posts /wp-admin/edit.php3.41 ▲0.0561.72 ▲17.66
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.05 ▼6.21
Media Library /wp-admin/upload.php3.28 ▲0.0542.26 ▲9.53

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

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

Browser metrics Passed 4 tests

WP Bouncer - Limit Simultaneous Logins: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.39 ▼0.172.15 ▲0.2753.58 ▲11.37
Dashboard /wp-admin2,206 ▲214.92 ▼0.93119.97 ▲10.9249.69 ▲6.69
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0342.37 ▲0.5844.78 ▲6.91
Add New Post /wp-admin/post-new.php1,398 ▼14417.79 ▼0.47701.21 ▲51.2968.27 ▲13.19
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.15117.83 ▲12.7359.07 ▲10.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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
Good news, no errors were detected

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 take a closer look at 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/wp-bouncer/wp-bouncer.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: login, security, protection, membership, firewall

wp-bouncer/wp-bouncer.php Passed 13 tests

The principal PHP file in "WP Bouncer - Limit Simultaneous Logins" v. 1.5.1 is loaded by WordPress automatically on each request
93 characters long description:
Deter members from sharing login credentials: restrict simultaneous logins for the same user.

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
Good job! No executable or dangerous file extensions detected257 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP167103215
PO File16825
JavaScript10117

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity4.31
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin