Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲13.71MB] [CPU: ▲100.30ms] 50% from 4 tests
A check of server-side resources used by Security Ninja - Secure Firewall & Secure Malware Scanner
Please have a look at the following items
- RAM: Try to keep total memory usage under 10MB (currently 19.35MB on /wp-admin/admin.php?page=freemius)
- Extra RAM: The extra memory usage must be under 5MB (currently 13.71MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.63 ▲6.17 | 78.92 ▲39.03 |
Dashboard /wp-admin | 19.69 ▲16.39 | 262.90 ▲213.86 |
Posts /wp-admin/edit.php | 19.69 ▲16.34 | 163.53 ▲117.34 |
Add New Post /wp-admin/post-new.php | 21.85 ▲15.97 | 218.95 ▲124.36 |
Media Library /wp-admin/upload.php | 19.61 ▲16.38 | 155.01 ▲120.47 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 19.35 | 104.32 |
Server storage [IO: ▲8.70MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 334 new files
Database: 1 new table, 10 new options
New tables |
---|
wp_wf_sn_tests |
New WordPress options |
---|
widget_theysaidso_widget |
fs_active_plugins |
fs_debug_mode |
wf_sn_vu_outdated |
fs_accounts |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by Security Ninja - Secure Firewall & Secure Malware Scanner
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,018 ▲271 | 13.60 ▼0.75 | 4.89 ▲3.15 | 31.57 ▼12.44 |
Dashboard /wp-admin | 2,392 ▲211 | 4.87 ▼0.82 | 126.49 ▲13.47 | 57.17 ▲11.17 |
Posts /wp-admin/edit.php | 2,213 ▲110 | 2.36 ▲0.41 | 49.33 ▲12.25 | 43.53 ▲10.12 |
Add New Post /wp-admin/post-new.php | 1,559 ▲23 | 22.10 ▼1.07 | 677.21 ▼12.06 | 47.05 ▼7.37 |
Media Library /wp-admin/upload.php | 1,512 ▲112 | 4.43 ▲0.22 | 106.14 ▲1.89 | 47.04 ▲0.48 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 1,186 | 2.00 | 45.02 | 34.85 |
Uninstaller [IO: ▲3.71MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/security-ninja/freemius/includes/class-freemius.php+8546
Undefined property: stdClass::$plugins
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_wf_sn_tests
- This plugin did not uninstall successfully, leaving 10 options in the database
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- fs_accounts
- theysaidso_admin_options
- fs_active_plugins
- fs_debug_mode
- can_compress_scripts
- wf_sn_vu_outdated
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
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/security-ninja/modules/vulnerabilities/class-wf-sn-vu.php
- > /wp-content/plugins/security-ninja/vendor/donatj/phpuseragentparser/bin/benchmark.php
- > /wp-content/plugins/security-ninja/modules/welcome/class-sec-nin-welcome.php
- 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'TypistTech\\Imposter\\FilesystemInterface' not found in wp-content/plugins/security-ninja/vendor/typisttech/imposter/src/Filesystem.php:12
- > PHP Fatal error
Uncaught Error: Interface 'TypistTech\\Imposter\\ImposterInterface' not found in wp-content/plugins/security-ninja/vendor/typisttech/imposter/src/Imposter.php:7
- > PHP Fatal error
Uncaught Error: Class 'WPSecurityNinja\\Plugin\\phpseclib\\Crypt\\Base' not found in wp-content/plugins/security-ninja/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php:129
- > PHP Fatal error
Uncaught Error: Interface 'TypistTech\\Imposter\\ConfigCollectionInterface' not found in wp-content/plugins/security-ninja/vendor/typisttech/imposter/src/ConfigCollection.php:7
- > PHP Warning
require(wp-content/plugins/security-ninja/vendor/donatj/phpuseragentparser/bin/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/security-ninja/vendor/donatj/phpuseragentparser/bin/init_user_agent.php on line 3
- > PHP Fatal error
Uncaught Error: Interface 'TypistTech\\Imposter\\ConfigInterface' not found in wp-content/plugins/security-ninja/vendor/typisttech/imposter/src/Config.php:7
- > PHP Fatal error
Uncaught Error: Class 'TypistTech\\Imposter\\Config' not found in wp-content/plugins/security-ninja/vendor/typisttech/imposter/src/ProjectConfig.php:9
- > PHP Fatal error
Uncaught Error: Class 'WPSecurityNinja\\Plugin\\phpseclib\\Crypt\\Rijndael' not found in wp-content/plugins/security-ninja/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php:59
- > PHP Warning
require(wp-content/plugins/security-ninja/vendor/donatj/phpuseragentparser/bin/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/security-ninja/vendor/donatj/phpuseragentparser/bin/user_agent_sorter.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'IP2Location\\Database' not found in wp-content/plugins/security-ninja/vendor/ip2location/ip2location-php/example.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: malware scanner, block hackers, hack, login security, firewall...
security-ninja/security-ninja.php 92% from 13 tests
"Security Ninja - Secure Firewall & Secure Malware Scanner" version 5.163's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
- Description: Please keep the plugin description shorter than 140 characters (currently 256 characters long)
Code Analysis 0% from 3 tests
File types 0% from 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
It is important to fix the following items
- Do not distribute dangerous files with your plugin
- .bin - Binary Executable in Windows, macOS, Linux
- ☣ wp-content/plugins/security-ninja/vendor/ip2location/ip2location-php/databases/IP2LOCATION-LITE-DB1.BIN
- .bin - Binary Executable in Windows, macOS, Linux
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 197 | 13,562 | 33,447 | 63,684 |
JSON | 9 | 0 | 0 | 2,020 |
Sass | 1 | 258 | 0 | 1,026 |
Markdown | 12 | 313 | 0 | 717 |
JavaScript | 10 | 79 | 107 | 379 |
YAML | 4 | 13 | 0 | 71 |
XML | 2 | 7 | 21 | 21 |
CSS | 14 | 0 | 1 | 14 |
make | 1 | 0 | 0 | 3 |
SVG | 1 | 0 | 0 | 1 |
PHP code 0% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
- Please reduce cyclomatic complexity of methods to less than 100 (currently 109)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 81.76 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,096.00 |
Average method complexity | 5.23 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 109.00 |
Code structure | ||
---|---|---|
Namespaces | 15 | |
Interfaces | 7 | |
Traits | 0 | |
Classes | 108 | |
▷ Abstract classes | 4 | 3.70% |
▷ Concrete classes | 104 | 96.30% |
▷ Final classes | 0 | 0.00% |
Methods | 2,249 | |
▷ Static methods | 426 | 18.94% |
▷ Public methods | 1,789 | 79.55% |
▷ Protected methods | 20 | 0.89% |
▷ Private methods | 440 | 19.56% |
Functions | 133 | |
▷ Named functions | 114 | 85.71% |
▷ Anonymous functions | 19 | 14.29% |
Constants | 406 | |
▷ Global constants | 141 | 34.73% |
▷ Class constants | 265 | 65.27% |
▷ Public constants | 264 | 99.62% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |
images/security-ninja-logo.png | 6.74KB | 7.44KB | 0.00% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
images/helpscout.png | 4.79KB | 5.10KB | 0.00% |
images/plugin-icon.png | 9.41KB | 4.79KB | ▼ 49.13% |