10% bravo-security

Code Review | Bravo WP security Plugin

WordPress plugin Bravo WP security Plugin scored10%from 54 tests.

About plugin

  • Plugin page: bravo-security
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Dec 11, 2017
  • Number of updates: 21
  • Update frequency: every 2.3 days
  • Top authors: technoyer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,252 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/bravo-security/includes/functions.php+103
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.63MB] [CPU: ▼54.45ms] Passed 4 tests

This is a short check of server-side resources used by Bravo WP security Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.117.15 ▼32.07
Dashboard /wp-admin2.38 ▼0.9310.04 ▼39.06
Posts /wp-admin/edit.php2.38 ▼0.988.75 ▼46.15
Add New Post /wp-admin/post-new.php2.38 ▼3.519.16 ▼100.53
Media Library /wp-admin/upload.php2.38 ▼0.8510.04 ▼30.03
Dashboard /wp-admin/admin.php?page=bravo-security2.389.69
WPConfig Tweak /wp-admin/admin.php?page=bravo-security-wconfig2.389.46
Database Backups /wp-admin/admin.php?page=bravo-security-backups2.389.83
Firewall & Rules /wp-admin/admin.php?page=bravo-security-firewall2.389.86
WPAdmin Security /wp-admin/admin.php?page=bravo-security-wadmin2.388.88
Housekeeping /wp-admin/admin.php?page=bravo-security-housekeeping2.389.46
Settings /wp-admin/admin.php?page=bravo-security-settings2.3810.48
Mail Watching /wp-admin/admin.php?page=bravo-security-mail2.3811.78
Cronjobs (Schedules) /wp-admin/admin.php?page=bravo-security-cronjobs2.3810.28
Log Watching /wp-admin/admin.php?page=bravo-security-logwatch2.389.77

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 283 new files
Database: 4 new tables, 134 new options
New tables
wp__tebravo_traffic
wp__tebravo_scan_ps
wp__tebravo_attemps
wp__tebravo_firewall_actions
New WordPress options
_tebravo_disable_wp_errors_debug
_tebravo_googshaver
_tebravo_hot_linking_img
_tebravo_fchange_infected_action
_tebravo_googshaver_api
_tebravo_wp_prefix_enabled
_tebravo_firewall_404_whiteext
_tebravo_hidewpversion
_tebravo_admins
_tebravo_scan_fchange_new
...

Browser metrics Passed 4 tests

An overview of browser requirements for Bravo WP security Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲17214.31 ▲0.091.82 ▲0.0241.44 ▼0.93
Dashboard /wp-admin2,323 ▲1435.59 ▼0.0699.62 ▲9.1792.29 ▲45.12
Posts /wp-admin/edit.php2,243 ▲1462.02 ▲0.0040.12 ▲3.5740.72 ▲5.26
Add New Post /wp-admin/post-new.php1,661 ▲13320.45 ▼2.74675.03 ▲27.5341.88 ▼7.59
Media Library /wp-admin/upload.php1,543 ▲1494.17 ▼0.09100.11 ▼5.4871.75 ▲23.30
Dashboard /wp-admin/admin.php?page=bravo-security1,4722.0928.7355.65
WPConfig Tweak /wp-admin/admin.php?page=bravo-security-wconfig1,2321.6926.7541.94
Database Backups /wp-admin/admin.php?page=bravo-security-backups1,0262.0624.6132.16
Firewall & Rules /wp-admin/admin.php?page=bravo-security-firewall1,2492.0624.7037.76
WPAdmin Security /wp-admin/admin.php?page=bravo-security-wadmin1,2241.6923.8655.17
Housekeeping /wp-admin/admin.php?page=bravo-security-housekeeping1,1021.6927.2536.91
Settings /wp-admin/admin.php?page=bravo-security-settings1,5171.7427.0751.25
Mail Watching /wp-admin/admin.php?page=bravo-security-mail1,0042.0623.4532.64
Cronjobs (Schedules) /wp-admin/admin.php?page=bravo-security-cronjobs1,2712.0623.9132.11
Log Watching /wp-admin/admin.php?page=bravo-security-logwatch9822.0523.4333.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/bravo-security/includes/functions.php+103
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bravo-security-logwatch
    • > Deprecated in wp-content/plugins/bravo-security/includes/functions.php+103
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: wordpress malware removal, best wordpress security, wordpress firewall, wp security, wp security plugin...

bravo-security/bravo-security.php 92% from 13 tests

The main PHP script in "Bravo WP security Plugin" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 198 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected30,889 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
PHP613,5883,34824,225
CSS9328243,740
PO File18351,0261,789
JavaScript81561961,050
HTML54084
JSON1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity66.34
▷ Minimum class complexity1.00
▷ Maximum class complexity349.00
Average method complexity5.64
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes00.00%
▷ Concrete classes47100.00%
▷ Final classes00.00%
Methods653
▷ Static methods10015.31%
▷ Public methods50677.49%
▷ Protected methods12719.45%
▷ Private methods203.06%
Functions117
▷ Named functions10690.60%
▷ Anonymous functions119.40%
Constants188
▷ Global constants9349.47%
▷ Class constants9550.53%
▷ Public constants95100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
139 PNG files occupy 0.31MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/auth_example.png22.57KB8.90KB▼ 60.58%
assets/img/icons/authors.png0.48KB0.40KB▼ 16.46%
assets/img/wizard.png0.68KB0.89KB0.00%
assets/img/default_icon.png0.98KB0.97KB0.20%
assets/img/icons/png.png0.66KB0.72KB0.00%