79% guardgiant

Code Review | WordPress Brute Force Protection - Stop Brute Force Attacks

WordPress plugin WordPress Brute Force Protection - Stop Brute Force Attacks scored 79% from 54 tests.

About plugin

  • Plugin page: guardgiant
  • Plugin version: 2.2.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Dec 1, 2020
  • Latest release: Mar 20, 2023
  • Number of updates: 54
  • Update frequency: every 15.6 days
  • Top authors: guardgiant (100%)Otto42 (3.7%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active / 8,555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.28ms] Passed 4 tests

Analyzing server-side resources used by WordPress Brute Force Protection - Stop Brute Force Attacks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.83 ▼0.83
Dashboard /wp-admin3.39 ▲0.0846.26 ▲0.46
Posts /wp-admin/edit.php3.50 ▲0.1448.02 ▼1.58
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.61 ▲2.13
Media Library /wp-admin/upload.php3.31 ▲0.0836.23 ▲0.81
Activity Log /wp-admin/admin.php?page=guardgiant-login-activity-log3.3132.10
Settings /wp-admin/admin.php?page=guardgiant3.3231.95

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 31 new files
Database: 3 new tables, 10 new options
New tables
wp_guardgiant_login_activity_log
wp_guardgiant_user_failed_logins
wp_guardgiant_ip_failed_logins
New WordPress options
guardgiant-settings
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
guardgiant_salt
guardgiant-install
widget_recent-posts
guardgiant-stats

Browser metrics Passed 4 tests

WordPress Brute Force Protection - Stop Brute Force Attacks: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.23 ▼1.161.55 ▼0.3639.98 ▼2.46
Dashboard /wp-admin2,229 ▲415.83 ▲0.9896.83 ▼14.3438.35 ▼3.71
Posts /wp-admin/edit.php2,115 ▲262.05 ▲0.0539.96 ▲3.4638.67 ▼0.51
Add New Post /wp-admin/post-new.php1,557 ▲3322.95 ▼0.41605.29 ▼71.9251.40 ▼27.87
Media Library /wp-admin/upload.php1,414 ▲324.23 ▲0.0198.62 ▲1.3241.18 ▼3.59
Activity Log /wp-admin/admin.php?page=guardgiant-login-activity-log1,3981.7228.6935.15
Settings /wp-admin/admin.php?page=guardgiant1,0842.0622.1526.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/guardgiant/public/partials/guardgiant-public-display.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/guardgiant/admin/partials/guardgiant-admin-activity-log.php:27
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/guardgiant/includes/class-guardgiant-table-login-activity-log.php on line 14
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/guardgiant/includes/class-guardgiant-table-login-activity-log.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/guardgiant/includes/class-guardgiant-table-login-activity-log.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/guardgiant/admin/partials/guardgiant-admin-display.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
7 plugin tags: brute force protection, stop brute force attacks, login protection, brute force login protection, limit login...

guardgiant/guardgiant.php Passed 13 tests

The principal PHP file in "WordPress Brute Force Protection - Stop Brute Force Attacks" v. 2.2.5 is loaded by WordPress automatically on each request
85 characters long description:
Security plugin with 100% brute force protection that doesn't lock out genuine users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,886 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP201,0751,7402,639
HTML12648241
JavaScript2466
CSS2060

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.37
Average class complexity30.64
▷ Minimum class complexity1.00
▷ Maximum class complexity146.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods126
▷ Static methods3326.19%
▷ Public methods11389.68%
▷ Protected methods32.38%
▷ Private methods107.94%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants32
▷ Global constants32100.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
No PNG images were found in this plugin