76% advanced-concurrent-login-limit

Code Review | Advanced Concurrent Login Limit

WordPress plugin Advanced Concurrent Login Limit scored 76% from 54 tests.

About plugin

  • Plugin page: advanced-concurre...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 28, 2016
  • Latest release: Jun 2, 2016
  • Number of updates: 9
  • Update frequency: every 54.1 days
  • Top authors: upscalethought (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼324.74ms] Passed 4 tests

Analyzing server-side resources used by Advanced Concurrent Login Limit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0454.19 ▲4.54
Dashboard /wp-admin3.13 ▼0.2817.54 ▼19.40
Posts /wp-admin/edit.php3.13 ▼0.5120.56 ▼19.99
Add New Post /wp-admin/post-new.php3.13 ▼3.8718.67 ▼1,247.38
Media Library /wp-admin/upload.php3.13 ▼0.1616.73 ▼12.17
User Limit Settings /wp-admin/admin.php?page=user-limit-setting-menu3.1318.24
Advanced LimitLogin /wp-admin/admin.php?page=custom_alimitlogin3.1318.86

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Concurrent Login Limit
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲7916.28 ▲0.316.32 ▼0.112.91 ▲0.15
Dashboard /wp-admin2,930 ▲766.19 ▼0.02117.43 ▼20.84158.77 ▼2.37
Posts /wp-admin/edit.php2,726 ▲353.24 ▲0.0066.66 ▲1.25142.97 ▲0.60
Add New Post /wp-admin/post-new.php1,807 ▲14716.98 ▼5.69409.00 ▲9.47158.31 ▼79.73
Media Library /wp-admin/upload.php1,738 ▲405.54 ▼0.00139.75 ▼11.14183.08 ▼8.88
User Limit Settings /wp-admin/admin.php?page=user-limit-setting-menu1,2322.5754.10113.63
Advanced LimitLogin /wp-admin/admin.php?page=custom_alimitlogin1,0012.4652.79101.68

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5316
    add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=custom_alimitlogin
    • > User deprecated in wp-includes/functions.php+5316
    add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/advanced-concurrent-login-limit/gen-advanced-concurrent-loginlimit.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/advanced-concurrent-login-limit/includes/users_loginlimit_settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 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
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: Please add images for these screenshots: #1 (Admin-LoginLimit Settings), #2 (Admin - Override Login)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

advanced-concurrent-login-limit/gen-advanced-concurrent-loginlimit.php 69% from 13 tests

The main PHP script in "Advanced Concurrent Login Limit" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("advanced-concurrent-login-limit.php" instead of "gen-advanced-concurrent-loginlimit.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 185 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/languages/")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected347 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32054252
JavaScript374295

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png18.82KB8.42KB▼ 55.26%
screenshot-1.png27.70KB13.58KB▼ 51.00%