90% wp-fail2ban-redux

Code Review | WP Fail2Ban Redux

WordPress plugin WP Fail2Ban Redux scored90%from 54 tests.

About plugin

  • Plugin page: wp-fail2ban-redux
  • Plugin version: 0.9.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Jul 13, 2016
  • Latest release: Oct 17, 2023
  • Number of updates: 29
  • Update frequency: every 91.9 days
  • Top authors: thebrandonallen (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

7,000+ active /67,089 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.71ms] Passed 4 tests

This is a short check of server-side resources used by WP Fail2Ban Redux
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.48 ▲1.34
Dashboard /wp-admin3.37 ▲0.0246.28 ▼13.07
Posts /wp-admin/edit.php3.48 ▲0.1246.15 ▼10.03
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.07 ▼11.94
Media Library /wp-admin/upload.php3.29 ▲0.0636.71 ▲0.20

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Fail2Ban Redux
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.081.75 ▲0.1443.31 ▼0.47
Dashboard /wp-admin2,198 ▲215.63 ▲0.0197.74 ▲6.8942.00 ▲2.44
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0133.04 ▼6.5534.05 ▼0.48
Add New Post /wp-admin/post-new.php1,528 ▲223.04 ▼0.14677.94 ▲11.6460.27 ▼8.06
Media Library /wp-admin/upload.php1,394 ▲34.19 ▲0.0097.26 ▲0.4142.10 ▼3.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: login, fail2ban, security, syslog

wp-fail2ban-redux/wp-fail2ban-redux.php Passed 13 tests

This is the main PHP file of "WP Fail2Ban Redux" version 0.9.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
91 characters long description:
Records various WordPress events to your server's system log for integration with Fail2Ban.

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
There were no executable files found in this plugin456 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5113550245
Markdown2670211

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods520.00%
▷ Public methods2392.00%
▷ Protected methods14.00%
▷ Private methods14.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin