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
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.18MB] [CPU: ▼0.25ms] Passed 4 tests
Analyzing server-side resources used by Cookies and Content Security Policy
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 40.84 ▼2.91 |
Dashboard /wp-admin | 3.48 ▲0.17 | 47.99 ▼4.24 |
Posts /wp-admin/edit.php | 3.59 ▲0.23 | 49.78 ▲4.70 |
Add New Post /wp-admin/post-new.php | 6.06 ▲0.17 | 95.20 ▲5.07 |
Media Library /wp-admin/upload.php | 3.40 ▲0.17 | 36.36 ▲1.46 |
Cookies and Content Security Policy /wp-admin/options-general.php?page=cacsp_settings | 3.71 | 33.57 |
Server storage [IO: ▲0.59MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
cacsp_option_actived |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Cookies and Content Security Policy
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,848 ▲91 | 13.35 ▼1.03 | 1.89 ▼0.14 | 40.92 ▼4.57 |
Dashboard /wp-admin | 2,232 ▲41 | 5.03 ▼0.87 | 111.01 ▲5.71 | 41.00 ▲1.40 |
Posts /wp-admin/edit.php | 2,117 ▲28 | 2.32 ▲0.14 | 42.13 ▲4.43 | 35.05 ▲6.39 |
Add New Post /wp-admin/post-new.php | 1,531 ▼2 | 17.79 ▼5.21 | 663.93 ▼12.24 | 36.62 ▼28.10 |
Media Library /wp-admin/upload.php | 1,414 ▲29 | 4.36 ▲0.15 | 96.96 ▼3.68 | 42.11 ▼5.48 |
Cookies and Content Security Policy /wp-admin/options-general.php?page=cacsp_settings | 893 | 2.12 | 27.69 | 29.34 |
Uninstaller [IO: ▲0.00MB] [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
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- can_compress_scripts
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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 14× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
- > /wp-content/plugins/cookies-and-content-security-policy/inc/functions.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/settings-cacsp-tab-colors.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/settings-cacsp-tab-texts.php
- > /wp-content/plugins/cookies-and-content-security-policy/cookies-and-content-security-policy.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/modal-cacsp.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/settings-cacsp-tab-quickstart.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/settings-cacsp-tab-settings.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/set-cacsp.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/settings-cacsp-tab-support.php
- > /wp-content/plugins/cookies-and-content-security-policy/inc/settings-cacsp-tab-domains.php
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/cookies-and-content-security-policy/inc/plugin-compability.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cookies-and-content-security-policy/inc/network.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
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
These attributes need to be fixed:
- Tags: There are too many tags (12 tag instead of maximum 10)
cookies-and-content-security-policy/cookies-and-content-security-policy.php 92% from 13 tests
The principal PHP file in "Cookies and Content Security Policy" v. 2.17 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Description: The description should be shorter than 140 characters (currently 178 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected4,568 lines of code in 29 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 97 | 59 | 2,987 |
PO File | 1 | 223 | 258 | 641 |
Sass | 4 | 7 | 13 | 617 |
JavaScript | 3 | 19 | 25 | 294 |
XML | 1 | 0 | 0 | 27 |
CSS | 2 | 0 | 2 | 2 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
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 | 32 | |
▷ Named functions | 29 | 90.62% |
▷ Anonymous functions | 3 | 9.38% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/grandma.png | 177.60KB | 52.97KB | ▼ 70.17% |
img/cookie.png | 90.16KB | 34.35KB | ▼ 61.91% |