78% limit-attempts

Code Review | Limit Attempts by BestWebSoft - WordPress Anti-Bot and Security Plugin for Login and Forms

WordPress plugin Limit Attempts by BestWebSoft - WordPress Anti-Bot and Security Plugin for Login and Forms scored78%from 54 tests.

About plugin

  • Plugin page: limit-attempts
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2014
  • Latest release: Apr 24, 2023
  • Number of updates: 46
  • Update frequency: every 69.5 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

7,000+ active /175,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.47ms] Passed 4 tests

A check of server-side resources used by Limit Attempts by BestWebSoft - WordPress Anti-Bot and Security Plugin for Login and Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.85 ▼4.65
Dashboard /wp-admin3.38 ▲0.0846.06 ▼4.86
Posts /wp-admin/edit.php3.50 ▲0.1451.65 ▲4.62
Add New Post /wp-admin/post-new.php5.98 ▲0.1088.21 ▲1.26
Media Library /wp-admin/upload.php3.31 ▲0.0836.83 ▲2.38

Server storage [IO: ▲5.15MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 135 new files
Database: 6 new tables, 8 new options
New tables
wp_lmtttmpts_denylist_email
wp_lmtttmpts_denylist
wp_lmtttmpts_email_list
wp_lmtttmpts_failed_attempts
wp_lmtttmpts_allowlist
wp_lmtttmpts_all_failed_attempts
New WordPress options
lmtttmpts_options
can_compress_scripts
bstwbsftwppdtplgns_options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Limit Attempts by BestWebSoft - WordPress Anti-Bot and Security Plugin for Login and Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲12913.23 ▼1.361.74 ▼0.2829.07 ▼16.51
Dashboard /wp-admin2,261 ▲735.89 ▲0.97103.11 ▼13.0740.41 ▼3.19
Posts /wp-admin/edit.php2,144 ▲552.05 ▲0.0636.41 ▼0.3635.00 ▼2.10
Add New Post /wp-admin/post-new.php1,559 ▲2623.26 ▼0.09661.53 ▼30.7562.71 ▲6.26
Media Library /wp-admin/upload.php1,443 ▲524.21 ▲0.0297.05 ▼1.4641.51 ▼3.37
Settings /wp-admin/limit-attempts.php260.440.069.88
Logs /wp-admin/limit-attempts-log.php260.440.075.19
Deny & Allow List /wp-admin/limit-attempts-deny-and-allowlist.php260.440.087.57
Blocked /wp-admin/limit-attempts-blocked.php260.440.066.91
Statistics /wp-admin/limit-attempts-statistics.php260.440.138.20
Add New /wp-admin/lmtttmpts-create-new-item.php260.440.055.02
BWS Panel /wp-admin/limit-attempts.php?page=lmtttmpts-bws-panel260.440.116.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/limit-attempts/includes/statistics.php on line 9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/limit-attempts/includes/blocked-email.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/limit-attempts/includes/blocked.php on line 8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/limit-attempts/includes/blocked.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/limit-attempts/includes/allowlist.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/limit-attempts/limit-attempts.php:30
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/limit-attempts/includes/denylist.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/limit-attempts/includes/allowlist.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/limit-attempts/includes/blocked-email.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/limit-attempts/includes/class-lmtttmpts-settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/limit-attempts.php
    • > Network (severe)
    wp-admin/limit-attempts.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/limit-attempts-log.php
    • > Network (severe)
    wp-admin/limit-attempts-log.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/limit-attempts-deny-and-allowlist.php
    • > Network (severe)
    wp-admin/limit-attempts-deny-and-allowlist.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/limit-attempts-blocked.php
    • > Network (severe)
    wp-admin/limit-attempts-blocked.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/limit-attempts-statistics.php
    • > Network (severe)
    wp-admin/limit-attempts-statistics.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/lmtttmpts-create-new-item.php
    • > Network (severe)
    wp-admin/lmtttmpts-create-new-item.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/limit-attempts.php?page=lmtttmpts-bws-panel
    • > Network (severe)
    wp-admin/limit-attempts.php?page=lmtttmpts-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (Message with allowed retries.), #2 (Error message when a user has been blocked.), #3 (Error message when a user has been added to deny list.), #4 (Plugin settings in WordPress admin panel.), #5 (Additional settings which allow to customize error messages in the form.), #6 (Plugin additional settings which allow to customize email messages.), #7 (Tab with Blocked IP addresses.), #8 (Tab with Blocked Email addresses.), #9 (Deny list with IP addresses.), #10 (Deny list with email addresses.), #11 (Add new Ip.), #12 (Allow list settings tab.), #13 (Tab with Statistics.)
You can take inspiration from this readme.txt

limit-attempts/limit-attempts.php Passed 13 tests

The principal PHP file in "Limit Attempts by BestWebSoft - WordPress Anti-Bot and Security Plugin for Login and Forms" v. 1.2.9 is loaded by WordPress automatically on each request
84 characters long description:
Protect WordPress website against brute force attacks. Limit rate of login attempts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected23,583 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PO File114,9989,0099,452
PHP188139337,974
CSS91902735,560
JavaScript736129526
SVG10071

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity70.00
▷ Minimum class complexity21.00
▷ Maximum class complexity224.00
Average method complexity9.17
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods6990.79%
▷ Protected methods00.00%
▷ Private methods79.21%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
72 PNG files occupy 3.10MB with 1.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/icons/plugins/bike-rental.png6.86KB2.68KB▼ 60.89%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
screenshot-13.png87.53KB30.55KB▼ 65.10%
bws_menu/css/jquery-ui-styles/1.11.4/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%