Benchmarks
Plugin footprint 82% 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 successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.19MB] [CPU: ▼0.48ms] Passed 4 tests
Server-side resources used by GDPR Consent Plugin
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.77 ▲0.31 | 46.22 ▲6.73 |
Dashboard /wp-admin | 3.47 ▲0.17 | 50.03 ▲1.31 |
Posts /wp-admin/edit.php | 3.58 ▲0.23 | 44.92 ▼1.61 |
Add New Post /wp-admin/post-new.php | 6.08 ▲0.19 | 82.01 ▼4.75 |
Media Library /wp-admin/upload.php | 3.39 ▲0.17 | 35.65 ▲3.12 |
All Consents /wp-admin/edit.php?post_type=gdprc_consent | 3.48 | 38.73 |
Add New Consent /wp-admin/post-new.php?post_type=gdprc_consent | 3.45 | 41.84 |
Settings /wp-admin/options-general.php?page=gdpr-consent-settings | 3.10 | 23.39 |
Server storage [IO: ▲2.16MB] [DB: ▲0.00MB] 67% from 3 tests
Input-output and database impact of this plugin
These are issues you should consider
- There were 1 file (1.92KB) illegally modified outside of "wp-content/plugins/gdpr-consent-lite/" and "wp-content/uploads/"
- (new file) wp-content/mu-plugins/gdprc-mu-plugin.php
Filesystem: 192 new files
Database: no new tables, 8 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
gdprc_firsttime_setup |
widget_theysaidso_widget |
gdpr-consent-settings |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for GDPR Consent Plugin
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,115 ▲380 | 13.87 ▼0.44 | 16.63 ▲14.69 | 51.70 ▲3.70 |
Dashboard /wp-admin | 2,278 ▲93 | 5.95 ▲0.13 | 112.88 ▼15.96 | 44.17 ▼2.76 |
Posts /wp-admin/edit.php | 2,163 ▲77 | 2.26 ▲0.23 | 39.56 ▲4.44 | 35.72 ▲1.02 |
Add New Post /wp-admin/post-new.php | 1,573 ▲52 | 23.37 ▲0.32 | 662.52 ▼22.68 | 63.37 ▲12.61 |
Media Library /wp-admin/upload.php | 1,460 ▲69 | 4.35 ▲0.16 | 102.83 ▲2.48 | 44.87 ▲0.79 |
All Consents /wp-admin/edit.php?post_type=gdprc_consent | 1,657 | 2.24 | 34.00 | 33.67 |
Add New Consent /wp-admin/post-new.php?post_type=gdprc_consent | 3,884 | 8.59 | 187.97 | 133.62 |
Settings /wp-admin/options-general.php?page=gdpr-consent-settings | 28 | 0.44 | 0.08 | 3.39 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 8 options
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- gdpr-consent-settings
- widget_recent-posts
- gdprc_firsttime_setup
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=gdprc_consent
- > Notice in wp-content/plugins/gdpr-consent-lite/Src/GdprConsentLite/Hooks/Actions/add_meta_boxes.php+74
Undefined index: post
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
- 3× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/gdpr-consent-lite/Library/Core/Core.php
- > /wp-content/plugins/gdpr-consent-lite/mu/plugin-controller.php
- > /wp-content/plugins/gdpr-consent-lite/GdprConsentPlugin.php
- 136× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
- > PHP Fatal error
Uncaught Error: Class 'Wpupgrader\\Libraries\\WordPress\\Plugins\\Core\\Settings' not found in wp-content/plugins/gdpr-consent-lite/Src/GdprConsentLite/Settings.php:4
- > PHP Fatal error
Uncaught Error: Class 'Wpupgrader\\Libraries\\WordPress\\Plugins\\Core\\Factory' not found in wp-content/plugins/gdpr-consent-lite/Library/Core/Factory/Blocks.php:6
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php:6
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php:7
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Wpupgrader\\Libraries\\WordPress\\Plugins\\Core\\Blocks\\Block' not found in wp-content/plugins/gdpr-consent-lite/Src/GdprConsentLite/Blocks/AbstractConsentsBlock.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/gdpr-consent-lite/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php:5
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
- > GET request to /wp-admin/options-general.php?page=gdpr-consent-settings
- > Network (severe)
wp-admin/options-general.php?page=gdpr-consent-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 94% from 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
These attributes need to be fixed:
- Tags: You are using too many tags: 13 tag instead of maximum 10
gdpr-consent-lite/GdprConsentPlugin.php 69% from 13 tests
The main PHP file in "GDPR Consent Plugin" ver. 3.0.10 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("gdpr-consent-lite.php" instead of "GdprConsentPlugin.php")
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
- Domain Path: The domain path folder was not found ("/languages")
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin9,310 lines of code in 179 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 169 | 1,035 | 1,210 | 6,345 |
SVG | 1 | 0 | 0 | 2,666 |
JSON | 3 | 0 | 0 | 260 |
XML | 1 | 0 | 0 | 34 |
CSS | 3 | 0 | 0 | 3 |
JavaScript | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 3.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 39.00 |
Average method complexity | 2.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 19 | |
Interfaces | 1 | |
Traits | 2 | |
Classes | 152 | |
▷ Abstract classes | 11 | 7.24% |
▷ Concrete classes | 141 | 92.76% |
▷ Final classes | 3 | 2.13% |
Methods | 279 | |
▷ Static methods | 40 | 14.34% |
▷ Public methods | 203 | 72.76% |
▷ Protected methods | 56 | 20.07% |
▷ Private methods | 20 | 7.17% |
Functions | 42 | |
▷ Named functions | 15 | 35.71% |
▷ Anonymous functions | 27 | 64.29% |
Constants | 7 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 7 | 100.00% |
▷ Public constants | 7 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.59MB with 0.40MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/lib/upgrade.png | 549.22KB | 88.24KB | ▼ 83.93% |
assets/lib/gdpr.png | 24.20KB | 7.79KB | ▼ 67.80% |
assets/lib/bg.png | 34.43KB | 17.41KB | ▼ 49.44% |