66% advanced-concurrent-login-limit

Code Review | Advanced Concurrent Login Limit

WordPress plugin Advanced Concurrent Login Limit scored66%from 54 tests.

About plugin

  • Plugin page: advanced-concurre...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • 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,588 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▼0.92MB] [CPU: ▼33.23ms] Passed 4 tests

Analyzing server-side resources used by Advanced Concurrent Login Limit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.16 ▼5.45
Dashboard /wp-admin3.03 ▼0.2822.57 ▼25.64
Posts /wp-admin/edit.php3.03 ▼0.3324.61 ▼23.26
Add New Post /wp-admin/post-new.php3.03 ▼2.8625.10 ▼72.91
Media Library /wp-admin/upload.php3.03 ▼0.2021.56 ▼11.11
User Limit Settings /wp-admin/admin.php?page=user-limit-setting-menu3.0323.89
Advanced LimitLogin /wp-admin/admin.php?page=custom_alimitlogin3.0324.91

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Advanced Concurrent Login Limit: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.25 ▼0.101.82 ▲0.2538.49 ▲0.26
Dashboard /wp-admin2,225 ▲455.65 ▲0.0492.61 ▲4.7839.10 ▼2.47
Posts /wp-admin/edit.php2,130 ▲272.00 ▼0.0139.53 ▲1.8636.20 ▲3.77
Add New Post /wp-admin/post-new.php1,552 ▲2623.05 ▼0.04647.53 ▲5.3654.08 ▼1.04
Media Library /wp-admin/upload.php1,433 ▲364.29 ▲0.1197.09 ▼1.9242.06 ▼5.36
User Limit Settings /wp-admin/admin.php?page=user-limit-setting-menu9521.6925.1126.84
Advanced LimitLogin /wp-admin/admin.php?page=custom_alimitlogin7882.0423.8524.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=custom_alimitlogin
    • > User deprecated in wp-includes/functions.php+5453
    Function add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead.

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings 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 just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Admin-LoginLimit Settings), #2 (Admin - Override Login)
  • Requires at least: Version format is invalid
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

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

"Advanced Concurrent Login Limit" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-concurrent-login-limit.php" instead of "gen-advanced-concurrent-loginlimit.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin347 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32054252
JavaScript374295

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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

All PNG images should be compressed to minimize bandwidth usage for end users
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-1.png27.70KB13.58KB▼ 51.00%
screenshot-2.png18.82KB8.42KB▼ 55.26%