Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.10MB] [CPU: ▼7.71ms] Passed 4 tests
Server-side resources used by Civic Cookie Control
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.29 ▲0.82 | 40.09 ▼0.41 |
Dashboard /wp-admin | 3.40 ▲0.05 | 47.18 ▼14.03 |
Posts /wp-admin/edit.php | 3.52 ▲0.15 | 48.39 ▲1.77 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.11 | 86.81 ▼16.25 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 36.67 ▼0.14 |
Server storage [IO: ▲1.17MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Civic Cookie Control
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,901 ▲155 | 13.47 ▼0.80 | 7.23 ▲5.45 | 41.67 ▼4.02 |
Dashboard /wp-admin | 2,247 ▲66 | 5.91 ▲0.27 | 88.28 ▼13.39 | 39.22 ▼3.42 |
Posts /wp-admin/edit.php | 2,154 ▲54 | 2.39 ▲0.45 | 41.48 ▲6.56 | 30.15 ▼5.69 |
Add New Post /wp-admin/post-new.php | 1,568 ▲40 | 23.32 ▲0.16 | 662.35 ▲19.84 | 34.91 ▼10.48 |
Media Library /wp-admin/upload.php | 1,449 ▲52 | 4.68 ▲0.48 | 101.77 ▲6.23 | 39.22 ▼4.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/civic-cookie-control-8/admin/partials/v8/admin-form-fields-display.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/civic-cookie-control-8/admin/partials/v9/admin-form-fields-display.php:3
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/civic-cookie-control-8/admin/partials/cookie-control-admin-display.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/civic-cookie-control-8/public/templates/govuk-cookiecontrol-details.php:2
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/civic-cookie-control-8/public/templates/govuk-cookiecontrol-public-inputs.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/civic-cookie-control-8/public/templates/govuk-cookiecontrol-banner.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: cookie legislation, gdpr, cookie, eu cookie law, cookies
civic-cookie-control-8/cookiecontrol-settings.php 92% from 13 tests
This is the main PHP file of "Civic Cookie Control" version 1.50, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("civic-cookie-control-8.php" instead of "cookiecontrol-settings.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected15,274 lines of code in 35 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Sass | 1 | 1,231 | 0 | 6,855 |
PHP | 21 | 572 | 569 | 5,784 |
CSS | 3 | 90 | 52 | 1,584 |
JavaScript | 7 | 83 | 10 | 1,006 |
JSON | 1 | 0 | 0 | 37 |
XML | 1 | 0 | 0 | 5 |
JSX | 1 | 1 | 7 | 3 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 235)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 68.22 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 375.00 |
Average method complexity | 11.61 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 235.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 57 | |
▷ Static methods | 2 | 3.51% |
▷ Public methods | 52 | 91.23% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 8.77% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/CookieControl_Civic.png | 10.03KB | 3.34KB | ▼ 66.73% |
admin/images/ccc-logo.png | 0.96KB | 0.53KB | ▼ 45.00% |
admin/images/icon-triangle.png | 1.03KB | 0.55KB | ▼ 45.96% |
admin/images/icon-diamond.png | 1.63KB | 1.15KB | ▼ 29.60% |