Benchmarks
Plugin footprint 57% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- Install procedure validation failed for this plugin
- > Warning in wp-content/plugins/ninjafirewall/lib/install_default.php+187
file_put_contents(wp-content/nfwlog/dropins.php): failed to open stream: No such file or directory
Server metrics [RAM: ▲1.09MB] [CPU: ▼1.00ms] Passed 4 tests
Server-side resources used by NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.33 ▲0.86 | 51.08 ▲7.45 |
Dashboard /wp-admin | 4.61 ▲1.30 | 53.11 ▲4.18 |
Posts /wp-admin/edit.php | 4.61 ▲1.25 | 52.11 ▲2.37 |
Add New Post /wp-admin/post-new.php | 6.86 ▲0.97 | 85.49 ▼18.01 |
Media Library /wp-admin/upload.php | 4.61 ▲1.38 | 44.81 ▲10.05 |
Logs /wp-admin/admin.php?page=nfsublog | 4.61 | 41.73 |
Dashboard /wp-admin/admin.php?page=NinjaFirewall | 4.61 | 41.59 |
WP+ Edition /wp-admin/admin.php?page=nfsubwplus | 4.61 | 39.07 |
Event Notifications /wp-admin/admin.php?page=nfsubevent | 4.61 | 37.99 |
Security Rules /wp-admin/admin.php?page=nfsubupdates | 4.72 | 37.58 |
Firewall Options /wp-admin/admin.php?page=nfsubopt | 4.61 | 37.73 |
Monitoring /wp-admin/admin.php?page=nfsubfileguard | 4.61 | 38.01 |
Login Protection /wp-admin/admin.php?page=nfsubloginprot | 4.61 | 36.78 |
Firewall Policies /wp-admin/admin.php?page=nfsubpolicies | 4.92 | 42.19 |
Anti-Malware /wp-admin/admin.php?page=nfsubmalwarescan | 4.61 | 35.39 |
Server storage [IO: ▲2.62MB] [DB: ▲0.09MB] 67% from 3 tests
Input-output and database impact of this plugin
Please fix the following
- You have illegally modified 12 files (2.47KB) outside of "wp-content/plugins/ninjafirewall/" and "wp-content/uploads/"
- (new file) wp-content/nfwlog/cache/livelog.php
- (new file) wp-content/nfwlog/.htaccess
- (new file) wp-content/nfwlog/cache/.htaccess
- (new file) wp-content/nfwlog/cache/db_hash.1.php
- (new file) wp-content/nfwlog/index.html
- (new file) wp-content/nfwlog/ninjafirewall.php
- (new file) wp-content/mu-plugins/0-ninjafirewall.php
- (new file) wp-content/nfwlog/cache/index.html
- (new file) wp-content/nfwlog/cache/.pid
- (new file) wp-content/nfwlog/firewall_2023-10.php
- ...
Filesystem: 100 new files
Database: no new tables, 8 new options
New WordPress options |
---|
nfw_options |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
nfw_rules |
widget_recent-comments |
Browser metrics Passed 4 tests
NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,960 ▲214 | 14.33 ▲0.05 | 2.11 ▲0.37 | 47.28 ▲4.65 |
Dashboard /wp-admin | 2,366 ▲186 | 5.65 ▼0.02 | 86.32 ▼6.10 | 67.21 ▲28.20 |
Posts /wp-admin/edit.php | 2,159 ▲56 | 1.98 ▲0.04 | 35.27 ▼5.52 | 35.84 ▼1.49 |
Add New Post /wp-admin/post-new.php | 1,588 ▲62 | 21.95 ▼1.08 | 656.46 ▲30.63 | 54.75 ▲1.34 |
Media Library /wp-admin/upload.php | 1,459 ▲59 | 4.16 ▼0.06 | 97.27 ▼7.14 | 62.73 ▲20.17 |
Logs /wp-admin/admin.php?page=nfsublog | 3,219 | 1.92 | 28.41 | 35.94 |
Dashboard /wp-admin/admin.php?page=NinjaFirewall | 1,581 | 3.10 | 73.29 | 42.12 |
WP+ Edition /wp-admin/admin.php?page=nfsubwplus | 1,284 | 2.05 | 33.03 | 49.30 |
Event Notifications /wp-admin/admin.php?page=nfsubevent | 1,254 | 1.87 | 30.37 | 29.94 |
Security Rules /wp-admin/admin.php?page=nfsubupdates | 2,262 | 1.71 | 25.01 | 26.59 |
Firewall Options /wp-admin/admin.php?page=nfsubopt | 1,204 | 1.75 | 24.94 | 33.10 |
Monitoring /wp-admin/admin.php?page=nfsubfileguard | 1,158 | 1.71 | 27.35 | 31.80 |
Login Protection /wp-admin/admin.php?page=nfsubloginprot | 1,337 | 1.87 | 25.53 | 26.17 |
Firewall Policies /wp-admin/admin.php?page=nfsubpolicies | 3,197 | 1.76 | 29.15 | 39.99 |
Anti-Malware /wp-admin/admin.php?page=nfsubmalwarescan | 894 | 1.83 | 25.76 | 26.63 |
Uninstaller [IO: ▲0.08MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
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 items
- 31× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
- > /wp-content/plugins/ninjafirewall/lib/email_sodium.php
- > /wp-content/plugins/ninjafirewall/lib/dashboard_about.php
- > /wp-content/plugins/ninjafirewall/lib/monitoring_file_guard.php
- > /wp-content/plugins/ninjafirewall/lib/monitoring_file_check.php
- > /wp-content/plugins/ninjafirewall/lib/wpplus.php
- > /wp-content/plugins/ninjafirewall/lib/security_rules_editor.php
- > /wp-content/plugins/ninjafirewall/lib/firewall.php
- > /wp-content/plugins/ninjafirewall/lib/event_notifications.php
- > /wp-content/plugins/ninjafirewall/lib/custom_plugin.php
- > /wp-content/plugins/ninjafirewall/lib/monitoring.php
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/ninjafirewall/lib/i18n-extra.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Tags: You are using too many tags: 16 tag instead of maximum 10
ninjafirewall/ninjafirewall.php Passed 13 tests
The main file in "NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall" v. 4.5.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
A true Web Application Firewall to protect and secure WordPress.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin16,649 lines of code in 49 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 41 | 2,229 | 3,517 | 10,200 |
PO File | 1 | 1,838 | 3,762 | 5,312 |
JavaScript | 3 | 107 | 121 | 743 |
CSS | 1 | 12 | 21 | 391 |
HTML | 3 | 0 | 0 | 3 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.53 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 204 | |
▷ Named functions | 202 | 99.02% |
▷ Anonymous functions | 2 | 0.98% |
Constants | 79 | |
▷ Global constants | 75 | 94.94% |
▷ Class constants | 4 | 5.06% |
▷ Public constants | 4 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 0.84MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/ninjafirewall_20.png | 0.57KB | 1.01KB | 0.00% |
images/bar-critical.png | 0.16KB | 0.16KB | ▼ 1.82% |
images/screenshots/firewall-log.png | 153.03KB | 39.35KB | ▼ 74.29% |
images/rate.png | 0.54KB | 0.49KB | ▼ 10.07% |
images/ninjafirewall_75.png | 5.59KB | 3.11KB | ▼ 44.49% |