78% miniorange-limit-login-attempts

Code Review | Limit Login Attempts

WordPress plugin Limit Login Attempts scored78%from 54 tests.

About plugin

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /95,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.84MB] [CPU: ▲9.91ms] Passed 4 tests

A check of server-side resources used by Limit Login Attempts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.43 ▲0.9653.91 ▲14.68
Dashboard /wp-admin4.14 ▲0.8455.00 ▲8.43
Posts /wp-admin/edit.php4.19 ▲0.8353.36 ▲6.62
Add New Post /wp-admin/post-new.php6.74 ▲0.85114.31 ▲9.91
Media Library /wp-admin/upload.php4.06 ▲0.8347.56 ▲15.85
Notifications /wp-admin/admin.php?page=notifications4.1567.97
Upgrade /wp-admin/admin.php?page=upgrade4.0539.97
Limit Login Attempts /wp-admin/admin.php?page=Limit_Login_Attempts4.0544.47
Reports /wp-admin/admin.php?page=reports4.0544.42
Premium Features /wp-admin/admin.php?page=advancedblocking4.1245.10
Dashboard /wp-admin/admin.php?page=dashboard4.0545.97
Account /wp-admin/admin.php?page=wpnsaccount4.0945.47
Settings /wp-admin/admin.php?page=mo_lla_login_and_spam4.2251.24

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 93 new files
Database: 6 new tables, 25 new options
New tables
wp_wpns_attack_logs
wp_wpns_email_sent_audit
wp_wpns_blocked_ips
wp_wpns_transactions
wp_wpns_ip_rate_details
wp_wpns_whitelisted_ips
New WordPress options
XSSAttack
mo_lla_activate_recaptcha_for_comments
WAFEnabled
limitAttack
widget_recent-posts
mo_lla_new_registration
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
mo_lla_activate_recaptcha_for_email_subscription
...

Browser metrics Passed 4 tests

An overview of browser requirements for Limit Login Attempts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17813.73 ▼0.642.01 ▲0.3535.11 ▼6.75
Dashboard /wp-admin2,314 ▲1345.04 ▼0.6489.08 ▲0.9784.50 ▲43.46
Posts /wp-admin/edit.php2,165 ▲652.38 ▲0.3734.57 ▼4.0433.22 ▼1.93
Add New Post /wp-admin/post-new.php1,729 ▲20122.50 ▼0.61647.92 ▼36.6633.86 ▼24.08
Media Library /wp-admin/upload.php1,459 ▲594.57 ▲0.3797.42 ▼14.7470.01 ▲21.71
Notifications /wp-admin/admin.php?page=notifications2,0268.60172.39104.11
Upgrade /wp-admin/admin.php?page=upgrade1,1982.0828.2643.80
Limit Login Attempts /wp-admin/admin.php?page=Limit_Login_Attempts1,0794.14107.9841.59
Reports /wp-admin/admin.php?page=reports1,3242.5245.5542.51
Premium Features /wp-admin/admin.php?page=advancedblocking2,2732.2029.0248.66
Dashboard /wp-admin/admin.php?page=dashboard1,0723.15111.1838.13
Account /wp-admin/admin.php?page=wpnsaccount1,0692.0628.5533.69
Settings /wp-admin/admin.php?page=mo_lla_login_and_spam2,2842.4654.1746.31

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • mo_lla_activate_recaptcha_for_email_subscription
    • theysaidso_admin_options
    • mo_lla_new_registration
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/miniorange-limit-login-attempts/views/setup-wizard/one.php
    • > /wp-content/plugins/miniorange-limit-login-attempts/handler/mowpns-setup-wizard.php
    • > /wp-content/plugins/miniorange-limit-login-attempts/views/setup-wizard/three.php
    • > /wp-content/plugins/miniorange-limit-login-attempts/views/setup-wizard/two.php
  • 72× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mo_lla_MoWpnsHandler' not found in wp-content/plugins/miniorange-limit-login-attempts/controllers/reports.php:19
    • > PHP Warning
      include_once(): Failed opening 'controllers/content-protection.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/miniorange-limit-login-attempts/views/login_spam.php on line 70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/miniorange-limit-login-attempts/controllers/navbar.php:6
    • > PHP Warning
      include_once(): Failed opening 'views/ip-blocking.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/miniorange-limit-login-attempts/views/login_spam.php on line 41
    • > PHP Fatal error
      Uncaught Error: Class 'Mo_lla_MoWpnsHandler' not found in wp-content/plugins/miniorange-limit-login-attempts/controllers/ip-blocking.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Mo_lla_MoWpnsDB' not found in wp-content/plugins/miniorange-limit-login-attempts/controllers/dashboard.php:4
    • > PHP Warning
      include_once(): Failed opening 'controllers/login-security.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/miniorange-limit-login-attempts/views/login_spam.php on line 34
    • > PHP Warning
      include_once(views/ip-blocking.php): failed to open stream: No such file or directory in wp-content/plugins/miniorange-limit-login-attempts/views/login_spam.php on line 41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/miniorange-limit-login-attempts/handler/spam.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/miniorange-limit-login-attempts/views/login_spam.php:84

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: traffic blocking, google recaptcha, spam protection, rename login url, ip blocking...

miniorange-limit-login-attempts/mo_limit_login_widget.php 92% from 13 tests

The main file in "Limit Login Attempts" v. 5.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("miniorange-limit-login-attempts.php" instead of "mo_limit_login_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin9,931 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP621,0791507,508
CSS7302342,187
JavaScript32215236

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity27.78
▷ Minimum class complexity1.00
▷ Maximum class complexity116.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods193
▷ Static methods2814.51%
▷ Public methods18093.26%
▷ Protected methods00.00%
▷ Private methods136.74%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants81
▷ Global constants44.94%
▷ Class constants7795.06%
▷ Public constants77100.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
16 PNG files occupy 0.24MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/error.png1.04KB1.13KB0.00%
includes/images/mowpns-security-logo.png11.86KB6.04KB▼ 49.07%
includes/images/support3.png2.49KB2.11KB▼ 15.28%
includes/images/wrong.png30.98KB13.50KB▼ 56.42%
includes/images/miniorange_logo.png1.95KB1.16KB▼ 40.58%