84% bruteguard

Code Review | BruteGuard – Brute Force Login Protection

WordPress plugin BruteGuard – Brute Force Login Protection scored84%from 54 tests.

About plugin

  • Plugin page: bruteguard
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Aug 16, 2017
  • Latest release: Oct 9, 2022
  • Number of updates: 39
  • Update frequency: every 50.1 days
  • Top authors: everpress (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,933 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.79ms] Passed 4 tests

This is a short check of server-side resources used by BruteGuard – Brute Force Login Protection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.79 ▼1.52
Dashboard /wp-admin3.41 ▲0.0650.32 ▼14.47
Posts /wp-admin/edit.php3.52 ▲0.1650.07 ▼1.39
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.24 ▼13.74
Media Library /wp-admin/upload.php3.33 ▲0.1037.53 ▼1.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for BruteGuard – Brute Force Login Protection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10414.35 ▼0.271.69 ▲0.1241.79 ▼5.15
Dashboard /wp-admin2,220 ▲435.53 ▼0.0785.60 ▼0.8080.65 ▲32.41
Posts /wp-admin/edit.php2,122 ▲222.00 ▲0.0335.66 ▼2.6434.77 ▼6.89
Add New Post /wp-admin/post-new.php1,558 ▲3218.08 ▼5.49630.68 ▼38.1056.53 ▲6.30
Media Library /wp-admin/upload.php1,425 ▲254.29 ▲0.1996.96 ▼18.2677.67 ▲27.19

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_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
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bruteguard() in wp-content/plugins/bruteguard/views/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bruteguard/bruteguard.php:14

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: bruteforce, security, login, brute force attack, brute force

bruteguard/bruteguard.php Passed 13 tests

The main PHP script in "BruteGuard – Brute Force Login Protection" version 0.1.4 is automatically included on every request by WordPress
105 characters long description:
BruteGuard is a cloud powered brute force login protection that shields your site against botnet attacks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected818 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP519314621
CSS22067
JavaScript28046
XML27036
Markdown121035
SVG10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity42.50
▷ Minimum class complexity12.00
▷ Maximum class complexity73.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods2567.57%
▷ Protected methods00.00%
▷ Private methods1232.43%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin