Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲2.55MB] [CPU: ▲5.78ms] Passed 4 tests
A check of server-side resources used by No unsafe-inline
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.93 ▲2.47 | 64.97 ▲19.85 |
Dashboard /wp-admin | 5.90 ▲2.55 | 63.43 ▼5.11 |
Posts /wp-admin/edit.php | 5.93 ▲2.58 | 67.37 ▲14.35 |
Add New Post /wp-admin/post-new.php | 8.57 ▲2.69 | 109.70 ▼5.25 |
Media Library /wp-admin/upload.php | 5.84 ▲2.61 | 55.11 ▲19.13 |
CSP settings /wp-admin/options-general.php?page=no-unsafe-inline | 6.04 | 60.22 |
Server storage [IO: ▲30.46MB] [DB: ▲0.01MB] 33% from 3 tests
Input-output and database impact of this plugin
Just a few items left to fix
- You have illegally modified 1 file (1.63KB) outside of "wp-content/plugins/no-unsafe-inline/" and "wp-content/uploads/"
- (new file) wp-content/mu-plugins/no-unsafe-inline-output-buffering.php
- Filesystem usage must be lower than 25MB (currently using 30.46MB)
Filesystem: 2,599 new files
Database: 5 new tables, 11 new options
New tables |
---|
wp_nunil_occurences |
wp_nunil_event_handlers |
wp_nunil_inline_scripts |
wp_nunil_logs |
wp_nunil_external_scripts |
New WordPress options |
---|
no-unsafe-inline-tools |
no-unsafe-inline_db_version |
no-unsafe-inline |
no-unsafe-inline_version |
theysaidso_admin_options |
no-unsafe-inline-base-rule |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for No unsafe-inline
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.72 ▲0.17 | 3.16 ▲1.36 | 39.20 ▼4.98 |
Dashboard /wp-admin | 2,196 ▲19 | 5.54 ▲0.01 | 99.14 ▼8.03 | 51.71 ▲9.71 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.98 ▼0.03 | 36.08 ▼3.50 | 33.64 ▲1.09 |
Add New Post /wp-admin/post-new.php | 1,541 ▲15 | 23.19 ▲0.19 | 650.42 ▼1.10 | 51.27 ▲4.09 |
Media Library /wp-admin/upload.php | 1,407 ▲4 | 4.19 ▼0.01 | 100.97 ▼5.56 | 45.97 ▲2.02 |
CSP settings /wp-admin/options-general.php?page=no-unsafe-inline | 1,377 | 2.25 | 52.14 | 42.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_nunil_logs
- The uninstall procedure has failed, leaving 9 options in the database
- no-unsafe-inline-base-rule
- no-unsafe-inline
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- no-unsafe-inline-tools
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/no-unsafe-inline/admin/partials/class-no-unsafe-inline-base-rule-list.php
- > /wp-content/plugins/no-unsafe-inline/public/partials/no-unsafe-inline-public-display.php
- > /wp-content/plugins/no-unsafe-inline/admin/partials/no-unsafe-inline-logs.php
- 893× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/tests/NeuralNet/ActivationFunctions/ReLUTest.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Amp\\Parallel\\Worker\\Task' not found in wp-content/plugins/no-unsafe-inline/vendor/amphp/parallel/lib/Worker/CallableTask.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/tests/Specifications/ExtensionMinimumVersionTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'Rubix\\ML\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Exceptions/LabelsAreMissing.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Rubix\\ML\\Transformers\\Transformer' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Transformers/ImageResizer.php:21
- > PHP Fatal error
Uncaught Error: Interface 'League\\Uri\\Contracts\\PathInterface' not found in wp-content/plugins/no-unsafe-inline/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php:16
- > PHP Fatal error
Uncaught Error: Interface 'Amp\\Parallel\\Sync\\ExitResult' not found in wp-content/plugins/no-unsafe-inline/vendor/amphp/parallel/lib/Sync/ExitFailure.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Rubix\\ML\\Graph\odes\\Decision' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Graph/Nodes/Split.php:19
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/tests/NeuralNet/Optimizers/RMSPropTest.php:18
- > PHP Fatal error
Uncaught Error: Interface 'Rubix\\ML\\Estimator' not found in wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Classifiers/RadiusNeighbors.php:40
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 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
5 plugin tags: content security policy, multisite, csp, security, unsafe-inline
no-unsafe-inline/no-unsafe-inline.php Passed 13 tests
This is the main PHP file of "No unsafe-inline" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
This plugin helps you to build a CSP to avoid using 'unsafe-inline' in your .htaccess
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
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .exe - Executable in Windows
- ☣ wp-content/plugins/no-unsafe-inline/vendor/amphp/process/bin/windows/ProcessWrapper.exe
- ☣ wp-content/plugins/no-unsafe-inline/vendor/amphp/process/bin/windows/ProcessWrapper64.exe
- ☣ wp-content/plugins/no-unsafe-inline/vendor/php-ai/php-ml/bin/libsvm/svm-predict.exe
- ☣ wp-content/plugins/no-unsafe-inline/vendor/php-ai/php-ml/bin/libsvm/svm-scale.exe
- ☣ wp-content/plugins/no-unsafe-inline/vendor/php-ai/php-ml/bin/libsvm/svm-train.exe
- .bat - Batch File in Windows
- ☣ wp-content/plugins/no-unsafe-inline/vendor/rubix/tensor/build-ext.bat
- .exe - Executable in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,590 | 27,501 | 59,816 | 136,463 |
JSON | 223 | 0 | 0 | 27,602 |
C | 48 | 3,868 | 3,410 | 25,741 |
Markdown | 287 | 5,128 | 2 | 14,791 |
CSS | 105 | 1,504 | 1,002 | 11,707 |
C/C++ Header | 54 | 872 | 309 | 3,412 |
PO File | 1 | 385 | 596 | 1,490 |
YAML | 21 | 200 | 3 | 1,107 |
JavaScript | 10 | 47 | 103 | 774 |
XML | 7 | 10 | 0 | 374 |
m4 | 1 | 12 | 0 | 79 |
make | 1 | 12 | 0 | 33 |
Bourne Shell | 2 | 5 | 1 | 31 |
Bourne Again Shell | 1 | 9 | 8 | 22 |
DOS Batch | 1 | 0 | 0 | 1 |
PHP code 0% from 2 tests
Analyzing cyclomatic complexity and code structure
Please tend to the following items
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,498)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 117)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 9.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,498.00 |
Average method complexity | 2.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 117.00 |
Code structure | ||
---|---|---|
Namespaces | 208 | |
Interfaces | 137 | |
Traits | 19 | |
Classes | 1,149 | |
▷ Abstract classes | 28 | 2.44% |
▷ Concrete classes | 1,121 | 97.56% |
▷ Final classes | 148 | 13.20% |
Methods | 7,362 | |
▷ Static methods | 966 | 13.12% |
▷ Public methods | 6,300 | 85.57% |
▷ Protected methods | 512 | 6.95% |
▷ Private methods | 550 | 7.47% |
Functions | 545 | |
▷ Named functions | 231 | 42.39% |
▷ Anonymous functions | 314 | 57.61% |
Constants | 940 | |
▷ Global constants | 50 | 5.32% |
▷ Class constants | 890 | 94.68% |
▷ Public constants | 379 | 42.58% |
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
61 PNG files occupy 0.67MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/css/jqueryui/1.13.1/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png | 0.32KB | 0.15KB | ▼ 53.40% |
admin/css/jqueryui/1.13.0/themes/smoothness/images/ui-icons_222222_256x240.png | 6.86KB | 4.18KB | ▼ 39.05% |
admin/css/jqueryui/1.12.1/themes/smoothness/images/ui-icons_cd0a0a_256x240.png | 4.57KB | 4.18KB | ▼ 8.43% |
admin/css/jqueryui/1.13.1/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png | 0.38KB | 0.15KB | ▼ 61.54% |
admin/css/jqueryui/1.13.0/themes/smoothness/images/ui-icons_cd0a0a_256x240.png | 4.51KB | 4.18KB | ▼ 7.28% |