Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▼0.54MB] [CPU: ▼20.72ms] Passed 4 tests
Analyzing server-side resources used by WP Content Security Plugin
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.12 ▼0.34 | 19.34 ▼18.86 |
Dashboard /wp-admin | 3.60 ▲0.30 | 51.84 ▲0.80 |
Posts /wp-admin/edit.php | 3.72 ▲0.36 | 50.21 ▼1.93 |
Add New Post /wp-admin/post-new.php | 3.48 ▼2.41 | 38.25 ▼62.90 |
Media Library /wp-admin/upload.php | 3.52 ▲0.30 | 37.57 ▲3.84 |
CSP Options /wp-admin/options-general.php?page=wpcsp_options | 3.60 | 42.74 |
CSP Log /wp-admin/options-general.php?page=wpcsp_log | 3.49 | 35.01 |
Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_wpcsplog |
New WordPress options |
---|
theysaidso_admin_options |
wpcsp-dbVersion |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
WP Content Security Plugin: 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,939 ▲193 | 13.79 ▼0.60 | 8.03 ▲6.31 | 39.91 ▼7.72 |
Dashboard /wp-admin | 2,223 ▲32 | 5.93 ▲1.00 | 108.89 ▼6.86 | 38.90 ▼6.16 |
Posts /wp-admin/edit.php | 2,106 ▲17 | 2.10 ▲0.13 | 42.80 ▲6.89 | 35.44 ▼0.92 |
Add New Post /wp-admin/post-new.php | 1,537 ▲4 | 23.12 ▼0.19 | 683.14 ▲23.66 | 58.95 ▲5.05 |
Media Library /wp-admin/upload.php | 1,399 ▲14 | 4.30 ▲0.06 | 99.06 ▼4.28 | 42.33 ▼4.14 |
CSP Options /wp-admin/options-general.php?page=wpcsp_options | 2,444 | 2.03 | 35.40 | 53.70 |
CSP Log /wp-admin/options-general.php?page=wpcsp_log | 823 | 1.80 | 24.37 | 26.54 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
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)
Even though no errors were found, this is by no means an exhaustive test
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
Almost there! Just fix the following items
- 4× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/wp-content-security-policy/wp-content-security-policy.php
- > /wp-content/plugins/wp-content-security-policy/admin/WP_CSP_Admin.php
- > /wp-content/plugins/wp-content-security-policy/admin/part-cspv3.php
- > /wp-content/plugins/wp-content-security-policy/includes/WP_CSP.php
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-content-security-policy/admin/part-cspsavechanges.php:1
- > PHP Fatal error
Uncaught Error: Class 'WP_CSP' not found in wp-content/plugins/wp-content-security-policy/admin/part-cspoptions.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-content-security-policy/admin/part-csptest.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-content-security-policy/admin/part-cspheaders.php:7
- > PHP Fatal error
Uncaught Error: Class 'WP_CSP' not found in wp-content/plugins/wp-content-security-policy/admin/part-cspcontrol.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Donate link: Invalid URI ("None")
wp-content-security-policy/wp-content-security-policy.php 92% from 13 tests
The entry point to "WP Content Security Plugin" version 2.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Domain Path: The domain path points to an invalid folder, "/languages" does not exist
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,292 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 234 | 293 | 2,025 |
JavaScript | 1 | 23 | 2 | 169 |
CSS | 1 | 3 | 0 | 98 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 137.00 |
▷ Minimum class complexity | 101.00 |
▷ Maximum class complexity | 173.00 |
Average method complexity | 8.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 69.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 38 | |
▷ Static methods | 36 | 94.74% |
▷ Public methods | 32 | 84.21% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 15.79% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 46 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 46 | 100.00% |
▷ Public constants | 46 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin