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
These installer errors require your attention
- The plugin did not install without errors
- > Warning in wp-content/plugins/wp-fail2ban/lib/activation.php+102
include_once(wp-content/plugins/wp-fail2ban/premium/activation.php): failed to open stream: No such file or directory
Server metrics [RAM: ▲5.22MB] [CPU: ▲5.41ms] 75% from 4 tests
An overview of server-side resources used by WP fail2ban - Advanced Security Plugin
The following require your attention
- Extra RAM: The extra memory usage should kept under 5MB (currently 5.22MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.21 ▲5.75 | 76.32 ▲34.38 |
Dashboard /wp-admin | 9.23 ▲5.93 | 66.84 ▲16.89 |
Posts /wp-admin/edit.php | 9.23 ▲5.87 | 59.57 ▲7.16 |
Add New Post /wp-admin/post-new.php | 9.23 ▲3.34 | 61.91 ▼31.87 |
Media Library /wp-admin/upload.php | 9.23 ▲6.00 | 60.96 ▲29.44 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 9.23 | 56.35 |
Server storage [IO: ▲3.43MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 247 new files
Database: no new tables, 9 new options
New WordPress options |
---|
db_upgraded |
fs_debug_mode |
fs_accounts |
theysaidso_admin_options |
widget_recent-posts |
fs_active_plugins |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for WP fail2ban - Advanced Security Plugin
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,966 ▲205 | 13.24 ▼1.06 | 5.18 ▲3.18 | 31.79 ▼11.38 |
Dashboard /wp-admin | 2,357 ▲151 | 5.15 ▼0.70 | 114.55 ▲11.89 | 98.65 ▲55.61 |
Posts /wp-admin/edit.php | 2,143 ▲43 | 2.02 ▼0.02 | 35.94 ▼3.34 | 40.23 ▲4.15 |
Add New Post /wp-admin/post-new.php | 1,561 ▲16 | 18.06 ▼5.28 | 664.83 ▲49.41 | 61.08 ▲13.31 |
Media Library /wp-admin/upload.php | 1,439 ▲36 | 4.23 ▲0.01 | 100.04 ▼2.59 | 85.17 ▲37.51 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 1,110 | 1.73 | 23.74 | 28.75 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/wp-fail2ban/admin/admin.php+304
Undefined offset: 0
- Zombie WordPress options were found after uninstall: 9 options
- fs_debug_mode
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- fs_active_plugins
- db_upgraded
- fs_accounts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=freemius
- > Notice in wp-content/plugins/wp-fail2ban/admin/admin.php+304
Undefined offset: 0
- > GET request to /wp-admin/admin.php?page=freemius
- > Notice in wp-content/plugins/wp-fail2ban/admin/admin.php+304
Trying to access array offset on value of type null
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
include(wp-content/plugins/wp-fail2ban/conf.d/plugins/wp-fail2ban/lib/constants.php): failed to open stream: No such file or directory in wp-content/plugins/wp-fail2ban/conf.d/default-all.php on line 33
- > PHP Warning
include(): Failed opening 'wp-content/plugins/wp-fail2ban/conf.d/plugins/wp-fail2ban/lib/constants.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-fail2ban/conf.d/default-all.php on line 33
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: classicpress, syslog, brute force, login, protection...
wp-fail2ban/wp-fail2ban.php Passed 13 tests
This is the main PHP file of "WP fail2ban - Advanced Security Plugin" version 5.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
75 characters long description:
Write a myriad of WordPress events to syslog for integration with fail2ban.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin37,974 lines of code in 178 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 155 | 8,727 | 20,555 | 37,641 |
JavaScript | 4 | 36 | 59 | 222 |
XML | 2 | 27 | 50 | 67 |
Markdown | 1 | 12 | 0 | 28 |
CSS | 15 | 0 | 0 | 15 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 75.87 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,088.00 |
Average method complexity | 4.35 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 62 | |
▷ Abstract classes | 6 | 9.68% |
▷ Concrete classes | 56 | 90.32% |
▷ Final classes | 0 | 0.00% |
Methods | 1,412 | |
▷ Static methods | 231 | 16.36% |
▷ Public methods | 987 | 69.90% |
▷ Protected methods | 52 | 3.68% |
▷ Private methods | 373 | 26.42% |
Functions | 193 | |
▷ Named functions | 177 | 91.71% |
▷ Anonymous functions | 16 | 8.29% |
Constants | 267 | |
▷ Global constants | 200 | 74.91% |
▷ Class constants | 67 | 25.09% |
▷ Public constants | 67 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon.png | 8.90KB | 7.57KB | ▼ 14.91% |
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |