Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.02MB] [CPU: ▼186.37ms] Passed 4 tests
A check of server-side resources used by WP Cookies Enabler
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.69 ▼0.14 | 27.84 ▼13.42 |
Dashboard /wp-admin | 3.15 ▲0.10 | 39.66 ▼13.17 |
Posts /wp-admin/edit.php | 3.21 ▲0.10 | 45.36 ▼14.86 |
Add New Post /wp-admin/post-new.php | 5.28 ▼0.15 | 83.69 ▼704.04 |
Media Library /wp-admin/upload.php | 3.18 ▲0.18 | 38.20 ▼13.01 |
Aspect /wp-admin/admin.php?page=wpce-aspect-options | 3.74 | 43.66 |
General Settings /wp-admin/admin.php?page=wpce-main-options | 3.74 | 51.85 |
Info /wp-admin/admin.php?page=wpce-info | 3.24 | 44.28 |
Server storage [IO: ▲5.49MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 355 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by WP Cookies Enabler
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,748 ▲176 | 16.31 ▲0.35 | 15.44 ▲4.32 | 52.35 ▲1.01 |
Dashboard /wp-admin | 3,000 ▲63 | 5.94 ▼0.08 | 156.62 ▼6.10 | 146.48 ▲20.98 |
Posts /wp-admin/edit.php | 2,797 ▲58 | 2.73 ▼0.00 | 92.29 ▲6.77 | 102.40 ▲8.68 |
Add New Post /wp-admin/post-new.php | 1,710 ▲129 | 18.79 ▲1.31 | 431.88 ▼43.69 | 116.79 ▼56.24 |
Media Library /wp-admin/upload.php | 1,791 ▼16 | 4.98 ▼0.05 | 148.30 ▼47.97 | 147.29 ▲17.81 |
Aspect /wp-admin/admin.php?page=wpce-aspect-options | 1,807 | 4.01 | 121.20 | 179.46 |
General Settings /wp-admin/admin.php?page=wpce-main-options | 2,861 | 9.24 | 248.03 | 217.96 |
Info /wp-admin/admin.php?page=wpce-info | 1,326 | 3.33 | 84.05 | 124.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 50% 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
- 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-cookies-enabler/inc/CMB2/example-functions.php:68
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-cookies-enabler/inc/CMB2/tests/cmb-tests-base.php:10
- > PHP Fatal error
require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-cookies-enabler/inc/CMB2/tests/bootstrap.php on line 24
- > PHP Notice
Undefined index: page in wp-content/plugins/wp-cookies-enabler/templates/index.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-cookies-enabler/inc/CMB2/bootstrap.php:17
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wp-cookies-enabler/inc/CMB2/tests/cmb-tests-base.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-cookies-enabler/templates/index.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-cookies-enabler/admin-options.php:41
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-cookies-enabler/templates/wpce-doc.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-cookies-enabler/templates/wpce-credits.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: postscribe, law, js, javascript, cookies...
wp-cookies-enabler/wp-cookies-enabler.php Passed 13 tests
Analyzing the main PHP file in "WP Cookies Enabler" version 1.0.1
125 characters long description:
Easy and lightweight solution to preventively block third-party cookies installed by js and to comply with the EU cookie law.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin89,642 lines of code in 191 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
XML | 2 | 0 | 0 | 47,741 |
PO File | 120 | 12,715 | 16,311 | 29,303 |
PHP | 30 | 1,399 | 2,446 | 5,152 |
CSS | 6 | 1,009 | 1,022 | 3,934 |
JavaScript | 12 | 492 | 312 | 1,594 |
Sass | 11 | 168 | 23 | 1,116 |
Markdown | 4 | 164 | 0 | 458 |
YAML | 2 | 9 | 0 | 152 |
JSON | 3 | 0 | 0 | 121 |
Bourne Shell | 1 | 19 | 7 | 71 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 26.36 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 113.00 |
Average method complexity | 2.74 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 22 | |
▷ Abstract classes | 1 | 4.55% |
▷ Concrete classes | 21 | 95.45% |
▷ Final classes | 0 | 0.00% |
Methods | 321 | |
▷ Static methods | 23 | 7.17% |
▷ Public methods | 307 | 95.64% |
▷ Protected methods | 9 | 2.80% |
▷ Private methods | 5 | 1.56% |
Functions | 37 | |
▷ Named functions | 37 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 4 | 66.67% |
▷ Class constants | 2 | 33.33% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
28 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/CMB2/images/ui-bg_glass_75_e6e6e6_1x400.png | 0.11KB | 0.14KB | 0.00% |
inc/CMB2/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.10KB | 0.17KB | 0.00% |
templates/assets/wpce-script.png | 2.01KB | 0.61KB | ▼ 69.71% |
templates/assets/wpce-iframe.png | 2.01KB | 0.61KB | ▼ 69.72% |
inc/CMB2/images/ico-delete.png | 0.70KB | 0.72KB | 0.00% |