Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.10MB] [CPU: ▼6.15ms] Passed 4 tests
An overview of server-side resources used by Fail2WP
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.05 | 44.28 ▲0.98 |
Dashboard /wp-admin | 3.43 ▲0.09 | 58.53 ▼8.19 |
Posts /wp-admin/edit.php | 3.48 ▲0.13 | 57.57 ▲8.05 |
Add New Post /wp-admin/post-new.php | 6.01 ▲0.13 | 92.88 ▼7.50 |
Media Library /wp-admin/upload.php | 3.35 ▲0.12 | 44.17 ▼9.88 |
Fail2WP /wp-admin/options-general.php?page=fail2wp | 3.32 | 40.30 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 21 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
fail2wp-roles-warn |
fail2wp-loginip-deny |
fail2wp-reguser-useremail-require |
fail2wp-rest-filter-ipv4-bypass |
fail2wp-roles-notify |
fail2wp-cloudflare-ipv4 |
widget_recent-posts |
db_upgraded |
... |
Browser metrics Passed 4 tests
Fail2WP: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.27 ▼0.07 | 1.67 ▼0.07 | 41.10 ▼1.83 |
Dashboard /wp-admin | 2,204 ▲27 | 5.56 ▼0.04 | 89.32 ▲1.77 | 37.39 ▼3.49 |
Posts /wp-admin/edit.php | 2,106 ▲6 | 1.97 ▼0.03 | 39.42 ▲0.84 | 34.80 ▼1.61 |
Add New Post /wp-admin/post-new.php | 1,531 ▲3 | 23.13 ▲0.10 | 613.71 ▼70.81 | 51.49 ▲0.65 |
Media Library /wp-admin/upload.php | 1,406 ▲6 | 4.24 ▼0.02 | 104.33 ▼2.28 | 50.36 ▲5.07 |
Fail2WP /wp-admin/options-general.php?page=fail2wp | 906 | 2.00 | 21.79 | 29.31 |
Uninstaller [IO: ▲0.31MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the followingThe uninstall procedure has failed, leaving 21 options in the database
- Uninstaller has failed for this plugin, leaving 32 files (0.31MB) in the plugin directory
- (new file) externals/index.php
- (new file) externals/php-cidr-match-0.4/CIDRmatch/CIDRmatch.php
- (new file) README.txt
- (new file) FAIL2BAN.txt
- (new file) externals/php-cidr-match-0.4/CIDRmatch/index.php
- (new file) externals/php-cidr-match-0.4/.travis.yml
- (new file) externals/php-cidr-match-0.4/LICENSE.txt
- (new file) externals/php-cidr-match-0.4/.gitignore
- (new file) LICENSE.txt
- (new file) css/fail2wp.css
- ...
- fail2wp-cloudflare-ipv4
- widget_theysaidso_widget
- fail2wp-rest-filter-ipv4-bypass
- fail2wp-loginip-allow
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- fail2wp-rest-filter-block-routes
- db_upgraded
- fail2wp-reguser-username-ban
- ...
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)
Good news, no errors were detected
SRP 0% 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
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/fail2wp/uninstall.php
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
require(wp-content/plugins/fail2wp/externals/php-cidr-match-0.4/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/fail2wp/externals/php-cidr-match-0.4/tests/bootstrap.php on line 3
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/fail2wp/externals/php-cidr-match-0.4/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/fail2wp/externals/php-cidr-match-0.4/tests/bootstrap.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fail2wp/externals/php-cidr-match-0.4/tests/CIDRmatchTest/CIDRmatchTest.php:10
- > PHP Warning
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)
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: authentication, security, fail2ban, admin, firewall
fail2wp/fail2wp.php Passed 13 tests
Analyzing the main PHP file in "Fail2WP" version 1.2.0
70 characters long description:
Security plugin for WordPress with support for Fail2ban and Cloudflare
Code Analysis 97% from 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 detected3,880 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 219 | 915 | 3,292 |
PO File | 1 | 167 | 184 | 470 |
JSON | 1 | 0 | 0 | 32 |
XML | 1 | 4 | 0 | 30 |
CSS | 1 | 1 | 3 | 29 |
Markdown | 1 | 7 | 0 | 14 |
YAML | 1 | 3 | 0 | 13 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 104)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.56 |
Average class complexity | 130.83 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 697.00 |
Average method complexity | 6.95 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 104.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 131 | |
▷ Static methods | 1 | 0.76% |
▷ Public methods | 111 | 84.73% |
▷ Protected methods | 14 | 10.69% |
▷ Private methods | 6 | 4.58% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 34 | |
▷ Global constants | 34 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/webbplatsen_logo.png | 9.32KB | 5.62KB | ▼ 39.71% |