Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼11.80ms] Passed 4 tests
Analyzing server-side resources used by Lawful Cookie Consent
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 36.48 ▼3.24 |
Dashboard /wp-admin | 3.32 ▼0.02 | 46.34 ▼21.08 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 46.67 ▼7.04 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 89.84 ▼15.82 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 35.36 ▼0.55 |
Settings /wp-admin/admin.php?page=settings_lawful_cookie_consent | 3.23 | 34.51 |
Help /wp-admin/admin.php?page=help_lawful_cookie_consent | 3.21 | 33.99 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: 1 new table, 6 new options
New tables |
---|
wc_lawful_cookie_consent |
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Lawful Cookie Consent
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,897 ▲136 | 14.30 ▼0.30 | 6.38 ▲4.79 | 49.55 ▲7.41 |
Dashboard /wp-admin | 2,224 ▲44 | 5.64 ▼0.01 | 89.91 ▼1.43 | 39.99 ▼5.21 |
Posts /wp-admin/edit.php | 2,129 ▲26 | 2.03 ▼0.01 | 39.45 ▼3.22 | 36.15 ▲0.99 |
Add New Post /wp-admin/post-new.php | 1,550 ▲24 | 23.02 ▲1.54 | 684.58 ▲4.95 | 51.06 ▼2.27 |
Media Library /wp-admin/upload.php | 1,429 ▲26 | 4.19 ▼0.03 | 96.52 ▼5.59 | 42.83 ▼6.76 |
Settings /wp-admin/admin.php?page=settings_lawful_cookie_consent | 941 | 1.99 | 22.93 | 26.94 |
Help /wp-admin/admin.php?page=help_lawful_cookie_consent | 840 | 1.99 | 21.53 | 25.07 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/admin.php?page=settings_lawful_cookie_consent
- > User notice in wp-includes/functions.php+5905
Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/lawful-cookie-consent/admin/lawful_cookie_consent_help.php
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lawful-cookie-consent/index.php:20
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/lawful-cookie-consent/include/lawful_cookie_consent_myform.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/lawful-cookie-consent/admin/lawful_cookie_consent_myform.php:2
- > 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 93% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: ccpa, cookie law, cookie banner, cookie consent, eu cookie law...
lawful-cookie-consent/index.php 85% from 13 tests
The main PHP script in "Lawful Cookie Consent" version 2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lawful-cookie-consent.php" instead of "index.php")
- Description: Please don't use more than 140 characters for the plugin description (currently 207 characters long)
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
There were no executable files found in this plugin669 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 2 | 63 | 0 | 354 |
PHP | 5 | 34 | 12 | 195 |
JavaScript | 2 | 27 | 2 | 108 |
SQL | 1 | 6 | 0 | 12 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
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 | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 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 were not PNG files found in your plugin