74% login-lockdown

Code Review | Login Lockdown - Protect Login Form

WordPress plugin Login Lockdown - Protect Login Form scored74%from 54 tests.

About plugin

  • Plugin page: login-lockdown
  • Plugin version: 2.07
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 16, 2008
  • Latest release: Nov 19, 2023
  • Number of updates: 63
  • Update frequency: every 93.9 days
  • Top authors: mvandemar (57.14%)WebFactory (44.44%)

Code review

54 tests

User reviews

55 reviews

Install metrics

100,000+ active /1,438,699 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.49MB] [CPU: ▲0.97ms] Passed 4 tests

This is a short check of server-side resources used by Login Lockdown - Protect Login Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5139.91 ▲2.06
Dashboard /wp-admin3.89 ▲0.5451.47 ▼11.16
Posts /wp-admin/edit.php3.88 ▲0.5254.13 ▲9.93
Add New Post /wp-admin/post-new.php6.37 ▲0.4893.40 ▲7.50
Media Library /wp-admin/upload.php3.69 ▲0.4637.23 ▲5.49
Login Lockdown /wp-admin/options-general.php?page=loginlockdown3.7544.20

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 60 new files
Database: 2 new tables, 9 new options
New tables
wp_login_fails
wp_lockdowns
New WordPress options
loginlockdown_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
loginlockdown_meta
db_upgraded
loginlockdown_pointers
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Login Lockdown - Protect Login Form: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲18413.54 ▼0.691.59 ▼0.0133.01 ▼12.97
Dashboard /wp-admin2,314 ▲1375.72 ▲0.09100.57 ▲0.3343.09 ▼0.49
Posts /wp-admin/edit.php2,153 ▲532.29 ▲0.2948.85 ▲12.9538.71 ▲3.02
Add New Post /wp-admin/post-new.php1,540 ▲1423.56 ▲0.44655.42 ▲2.6659.77 ▲10.08
Media Library /wp-admin/upload.php1,447 ▲474.33 ▲0.16102.00 ▲0.0547.41 ▲1.85
Login Lockdown /wp-admin/options-general.php?page=loginlockdown2,8415.01127.72360.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_lockdowns
    • wp_login_fails
  • The uninstall procedure has failed, leaving 9 options in the database
    • loginlockdown_meta
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • loginlockdown_options
    • loginlockdown_pointers
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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
Almost there! Just fix the following items
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/interface/tab_geoip.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/libs/stats.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/libs/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/interface/tab_captcha.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/interface/tab_cloud_protection.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/libs/setup.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/libs/utility.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/interface/tab_activity.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/interface/tab_login_form.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'LoginLockdown' not found in wp-content/plugins/login-lockdown/libs/functions.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: login control, login blocking, login form, security, ban ip...

login-lockdown/loginlockdown.php 92% from 13 tests

This is the main PHP file of "Login Lockdown - Protect Login Form" version 2.07, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("login-lockdown.php" instead of "loginlockdown.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin6,843 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS5433352,737
PHP185563612,645
JavaScript8130461,384
SVG10077

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.31
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods87
▷ Static methods8091.95%
▷ Public methods87100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants7
▷ Global constants7100.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
22 PNG files occupy 0.49MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wf-flyout/icons/301-logo.png6.33KB3.09KB▼ 51.22%
images/loginlockdown-logo.png24.33KB3.49KB▼ 85.64%
images/temporary-access.png38.23KB13.66KB▼ 64.27%
images/sort_both.png2.85KB0.19KB▼ 93.48%
wf-flyout/icons/wp-reset.png3.11KB2.28KB▼ 26.85%