10% wp-login-attempt-log

Code Review | WP Login Attempt Log

WordPress plugin WP Login Attempt Log scored10%from 54 tests.

About plugin

  • Plugin page: wp-login-attempt-log
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.5
  • WordPress version: 6.3.1
  • First release: Jun 21, 2014
  • Latest release: Jun 6, 2017
  • Number of updates: 22
  • Update frequency: every 49.3 days
  • Top authors: fredsted (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /6,653 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-login-attempt-log/login-attempt-log.php+21
    Undefined variable: wpdb

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.97ms] Passed 4 tests

Server-side resources used by WP Login Attempt Log
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.94 ▼0.74
Dashboard /wp-admin3.31 ▲0.0150.31 ▼3.21
Posts /wp-admin/edit.php3.37 ▲0.0145.46 ▼7.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.15 ▼7.98
Media Library /wp-admin/upload.php3.24 ▲0.0138.12 ▲4.79
Log /wp-admin/admin.php?page=lal_log_show3.2635.74
Settings /wp-admin/admin.php?page=lal-settings3.2533.74

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_login_attempt_log
New WordPress options
widget_recent-posts
lal_db_version
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Login Attempt Log
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.35 ▼0.181.77 ▲0.1443.77 ▼3.97
Dashboard /wp-admin2,221 ▲415.62 ▲0.0688.39 ▼4.2438.54 ▼5.96
Posts /wp-admin/edit.php2,123 ▲232.02 ▲0.0535.18 ▼0.9534.33 ▼0.77
Add New Post /wp-admin/post-new.php1,545 ▲2023.14 ▼0.62654.04 ▲15.5552.52 ▼7.59
Media Library /wp-admin/upload.php1,426 ▲264.12 ▼0.09104.85 ▼5.0743.25 ▲1.18
Log /wp-admin/admin.php?page=lal_log_show1,0041.7727.3842.28
Settings /wp-admin/admin.php?page=lal-settings8751.7125.7127.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • lal_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant LOGIN_ATTEMPT_LOG - assumed 'LOGIN_ATTEMPT_LOG' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-login-attempt-log/lal-settings-init.php on line 3
    • > PHP Warning
      Use of undefined constant LOGIN_ATTEMPT_LOG - assumed 'LOGIN_ATTEMPT_LOG' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-login-attempt-log/lal-log-init.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-login-attempt-log/templates/lal-settings.tpl.php:116
    • > PHP Notice
      Undefined variable: counts in wp-content/plugins/wp-login-attempt-log/templates/lal-settings.tpl.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-login-attempt-log/lal-settings-init.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-login-attempt-log/lal-log-init.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-login-attempt-log/templates/lal-log.tpl.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
4 plugin tags: log, security, attempt, login

wp-login-attempt-log/login-attempt-log.php 85% from 13 tests

The entry point to "WP Login Attempt Log" version 1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-login-attempt-log.php" instead of "login-attempt-log.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 165 characters long)

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
Good job! No executable or dangerous file extensions detected916 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP510425480
JavaScript119351
CSS114479
Markdown1406

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.43MB with 0.32MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png267.52KB71.47KB▼ 73.28%
assets/screenshot-1.png177.85KB49.79KB▼ 72.00%