77% better-wp-security

Code Review | Solid Security – Password, Two Factor Authentication, and Brute Force Protection

WordPress plugin Solid Security – Password, Two Factor Authentication, and Brute Force Protection scored77%from 54 tests.

About plugin

Code review

54 tests

User reviews

3925 reviews

Install metrics

900,000+ active /29,289,808 total downloads

Benchmarks

Plugin footprint 81% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲6.00MB] [CPU: ▲46.81ms] 50% from 4 tests

An overview of server-side resources used by Solid Security – Password, Two Factor Authentication, and Brute Force Protection
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 13.46MB on /wp-admin/admin.php?page=itsec-go-pro)
  • Extra RAM: The extra memory usage must be under 5MB (currently 6.00MB on /wp-admin/admin.php?page=itsec-go-pro)
PageMemory (MB)CPU Time (ms)
Home /12.20 ▲8.7490.16 ▲50.61
Dashboard /wp-admin8.65 ▲5.3590.11 ▲38.35
Posts /wp-admin/edit.php8.73 ▲5.38100.50 ▲55.55
Add New Post /wp-admin/post-new.php13.72 ▲7.83143.69 ▲42.71
Media Library /wp-admin/upload.php8.66 ▲5.4387.48 ▲55.91
Setup /wp-admin/admin.php?page=itsec13.65124.54
Get More Security /wp-admin/admin.php?page=itsec-go-pro13.46114.45

Server storage [IO: ▲20.93MB] [DB: ▲0.02MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • Illegal file modification found: 2 files (7.09KB) outside of "wp-content/plugins/better-wp-security/" and "wp-content/uploads/"
    • (modified) .htaccess
    • (modified) wp-config.php
Filesystem: 2,000 new files
Database: 14 new tables, 7 new options
New tables
wp_itsec_dashboard_events
wp_itsec_bans
wp_itsec_logs
wp_itsec_mutexes
wp_itsec_user_groups
wp_itsec_vulnerabilities
wp_itsec_lockouts
wp_itsec_geolocation_cache
wp_itsec_firewall_rules
wp_itsec_temp
...
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
itsec-storage
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Solid Security – Password, Two Factor Authentication, and Brute Force Protection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18019.80 ▲5.451.61 ▼0.1940.93 ▼5.35
Dashboard /wp-admin2,348 ▲1749.99 ▲4.34278.66 ▲186.8144.86 ▲3.20
Posts /wp-admin/edit.php2,241 ▲1449.65 ▲7.64114.55 ▲78.2840.83 ▲6.81
Add New Post /wp-admin/post-new.php1,766 ▲24026.62 ▲3.20681.73 ▲57.2139.24 ▼3.57
Media Library /wp-admin/upload.php1,617 ▲21711.56 ▲7.37166.30 ▲68.1253.55 ▲11.88
Setup /wp-admin/admin.php?page=itsec1,46113.12248.6648.38
Get More Security /wp-admin/admin.php?page=itsec-go-pro96310.55160.0743.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/better-wp-security/vendor-prod/deliciousbrains/wp-background-processing/tests/bootstrap.php
    • > /wp-content/plugins/better-wp-security/lib/index.php
    • > /wp-content/plugins/better-wp-security/index.php
  • 380× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/better-wp-security/core/modules/feature-flags/labels.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/better-wp-security/core/modules/two-factor/labels.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'iThemesSecurity\\Lib\\Config_Password_Requirement' not found in wp-content/plugins/better-wp-security/core/modules/hibp/HIBP_Requirement.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Two_Factor_Provider' not found in wp-content/plugins/better-wp-security/core/modules/two-factor/providers/class.two-factor-email.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'iThemesSecurity\\Lib\\Site_Types\\Question' not found in wp-content/plugins/better-wp-security/core/lib/site-types/Templated_Question.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/better-wp-security/core/modules/sync-connect/templates/connect-prompt.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ITSEC_Login_Interstitial' not found in wp-content/plugins/better-wp-security/core/lib/login-interstitial/class-itsec-login-interstitial-config-driven.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-wp-security/core/modules/file-change/class-itsec-file-change.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'iThemesSecurity\\Ban_Hosts\\Ban' not found in wp-content/plugins/better-wp-security/core/lib/ban-hosts/Repository_Ban.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/better-wp-security/core/modules/file-change/scanner.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
5 plugin tags: malware, password protection, security, brute force protection, two factor authentication

better-wp-security/better-wp-security.php Passed 13 tests

The main PHP script in "Solid Security – Password, Two Factor Authentication, and Brute Force Protection" version 9.1.0 is automatically included on every request by WordPress
130 characters long description:
Shield your site from cyberattacks and prevent security vulnerabilities. The only security plugin you need for a solid foundation.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin113,690 lines of code in 1,455 files:
LanguageFilesBlank linesComment linesLines of code
PHP59115,61418,63762,138
JavaScript6315,4666,24438,375
JSON46003,917
HTML314951552,837
Sass55439192,226
SVG56001,656
CSS29146451,346
Markdown51900602
Bourne Shell12311147
Python22773140
YAML2130116
reStructuredText19613997
XML4121679
make14014

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity18.43
▷ Minimum class complexity1.00
▷ Maximum class complexity346.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces50
Interfaces50
Traits2
Classes408
▷ Abstract classes184.41%
▷ Concrete classes39095.59%
▷ Final classes15640.00%
Methods3,993
▷ Static methods88522.16%
▷ Public methods3,33783.57%
▷ Protected methods2766.91%
▷ Private methods3809.52%
Functions427
▷ Named functions16638.88%
▷ Anonymous functions26161.12%
Constants325
▷ Global constants123.69%
▷ Class constants31396.31%
▷ Public constants29794.89%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
33 PNG files occupy 7.00MB with 3.85MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/mail/logo.png14.70KB5.21KB▼ 64.55%
core/img/mail/pro_logo.png15.80KB5.59KB▼ 64.60%
dist/20ba44d1ff0f0e29ccb0.png958.19KB345.35KB▼ 63.96%
dist/388febe5c99ff56cba7e.png798.03KB244.49KB▼ 69.36%
core/img/mail/icon_lock.png0.37KB0.32KB▼ 12.80%