84% failed-login-firewall

Code Review | Failed Login Firewall reporting

WordPress plugin Failed Login Firewall reporting scored 84% from 54 tests.

About plugin

  • Plugin page: failed-login-fire...
  • Plugin version: 0.32
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Feb 1, 2016
  • Latest release: Mar 3, 2022
  • Number of updates: 7
  • Update frequency: every 317.7 days
  • Top authors: anton.aleksandrov (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,658 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.22ms] Passed 4 tests

An overview of server-side resources used by Failed Login Firewall reporting
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.97 ▼2.57
Dashboard /wp-admin3.34 ▲0.0349.77 ▲2.87
Posts /wp-admin/edit.php3.39 ▲0.0343.61 ▼7.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.90 ▼19.05
Media Library /wp-admin/upload.php3.26 ▲0.0336.25 ▼0.08
Failed login firewall settings /wp-admin/options-general.php?page=failed_login_firewall_configuration3.2228.53

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
failed_login_firewall_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Failed Login Firewall reporting
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.56 ▼0.971.64 ▼0.8443.83 ▼1.95
Dashboard /wp-admin2,213 ▲254.82 ▼0.06103.95 ▼1.7437.61 ▼7.57
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0135.58 ▼7.6035.28 ▼0.70
Add New Post /wp-admin/post-new.php1,537 ▲423.34 ▲0.25656.10 ▼3.3851.89 ▼1.45
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.0597.80 ▼1.7642.61 ▲1.50
Failed login firewall settings /wp-admin/options-general.php?page=failed_login_firewall_configuration8022.0223.5923.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • failed_login_firewall_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/failed-login-firewall/class.failed_login_firewall.php
    • > /wp-content/plugins/failed-login-firewall/failed-login-firewall.php
    • > /wp-content/plugins/failed-login-firewall/class.failed_login_firewall.admin.php

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 94% from 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
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === failed-login-firewall === )
You can look at the official readme.txt

failed-login-firewall/failed-login-firewall.php 92% from 13 tests

This is the main PHP file of "Failed Login Firewall reporting" version 0.32, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 245 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
No dangerous file extensions were detected133 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39144133

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin