Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼5.10ms] Passed 4 tests
Server-side resources used by WP Consent API
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 42.87 ▲2.61 |
Dashboard /wp-admin | 3.38 ▲0.03 | 55.33 ▼4.00 |
Posts /wp-admin/edit.php | 3.49 ▲0.13 | 45.90 ▲5.04 |
Add New Post /wp-admin/post-new.php | 5.96 ▲0.07 | 82.54 ▼21.35 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 35.15 ▲2.34 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
WP Consent API: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲59 | 13.67 ▼0.92 | 1.94 ▲0.22 | 42.38 ▲0.20 |
Dashboard /wp-admin | 2,209 ▲21 | 4.90 ▼0.04 | 103.11 ▼3.79 | 39.94 ▲1.92 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.04 ▼0.01 | 34.85 ▼6.27 | 31.61 ▼6.37 |
Add New Post /wp-admin/post-new.php | 1,521 ▲4 | 23.47 ▲5.97 | 665.36 ▲50.41 | 58.46 ▲8.22 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.17 ▼0.02 | 97.78 ▼1.33 | 42.47 ▲1.75 |
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 did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
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
Everything seems fine, however this is by no means an exhaustive test
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
- 5× PHP files output text when accessed directly:
- > /wp-content/plugins/wp-consent-api/config.php
- > /wp-content/plugins/wp-consent-api/site-health.php
- > /wp-content/plugins/wp-consent-api/api.php
- > /wp-content/plugins/wp-consent-api/wp-consent-api.php
- > /wp-content/plugins/wp-consent-api/cookie-info.php
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-consent-api/wordpress-comments.php:45
- > 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
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: compliance, privacy, consent, cookies, api
wp-consent-api/wp-consent-api.php Passed 13 tests
"WP Consent API" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
130 characters long description:
Consent Level API to read and register the current consent level for cookie management and improving compliance with privacy laws.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin637 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 93 | 492 | 335 |
Markdown | 1 | 61 | 0 | 148 |
JavaScript | 2 | 24 | 42 | 58 |
JSON | 2 | 2 | 0 | 47 |
XML | 1 | 7 | 13 | 31 |
CSS | 1 | 3 | 0 | 18 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 4.25 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 1.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 18 | |
▷ Static methods | 2 | 11.11% |
▷ Public methods | 14 | 77.78% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 22.22% |
Functions | 18 | |
▷ Named functions | 18 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 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
There are no PNG files in this plugin