62% wp-gdpr-compliance

Code Review | Cookie Information | Free GDPR Consent Solution

WordPress plugin Cookie Information | Free GDPR Consent Solution scored62%from 54 tests.

About plugin

  • Plugin page: wp-gdpr-compliance
  • Plugin version: 2.0.22
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.9
  • WordPress version: 6.3.1
  • First release: Nov 4, 2017
  • Latest release: Feb 15, 2023
  • Number of updates: 167
  • Update frequency: every 11.6 days
  • Top authors: donnyoexman (36.53%)merlijnvanlent (32.34%)Van Ons (17.37%)tomgreep (13.17%)dennisvo (2.99%)

Code review

54 tests

User reviews

141 reviews

Install metrics

100,000+ active /3,641,465 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.41MB] [CPU: ▲9.01ms] Passed 4 tests

A check of server-side resources used by Cookie Information | Free GDPR Consent Solution
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3854.02 ▲11.86
Dashboard /wp-admin3.73 ▲0.4356.42 ▲5.84
Posts /wp-admin/edit.php3.85 ▲0.4965.42 ▲16.64
Add New Post /wp-admin/post-new.php6.31 ▲0.4291.33 ▲3.91
Media Library /wp-admin/upload.php3.63 ▲0.4047.73 ▲14.44
Requests /wp-admin/admin.php?page=wp-gdpr-compliance-requests3.8552.13
Settings /wp-admin/admin.php?page=wp-gdpr-compliance-settings3.4232.41
Wizard /wp-admin/admin.php?page=wp-gdpr-compliance-wizard3.6446.06
Dashboard /wp-admin/admin.php?page=wp-gdpr-compliance3.8555.60

Server storage [IO: ▲2.31MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 299 new files
Database: 4 new tables, 15 new options
New tables
wp_wpgdprc_access_requests
wp_wpgdprc_delete_requests
wp_wpgdprc_log
wp_wpgdprc_consents
New WordPress options
widget_recent-comments
wpgdprc_db_version_consents
db_upgraded
wpgdprc_data_access_request_ids
wpgdprc_db_version_access_requests
widget_theysaidso_widget
widget_recent-posts
wpgdprc_settings_enable_premium_mode
wpgdprc_activated
wpgdprc_db_version_log
...

Browser metrics Passed 4 tests

A check of browser resources used by Cookie Information | Free GDPR Consent Solution
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,116 ▲35917.53 ▲3.158.06 ▲6.1936.13 ▼13.14
Dashboard /wp-admin2,388 ▲2007.94 ▲2.12193.00 ▲86.9444.05 ▲4.02
Posts /wp-admin/edit.php2,303 ▲2145.33 ▲3.3698.98 ▲61.5129.91 ▼4.27
Add New Post /wp-admin/post-new.php1,564 ▲5025.06 ▲7.58714.05 ▲47.1536.84 ▼20.91
Media Library /wp-admin/upload.php1,442 ▲516.51 ▲2.32136.78 ▲40.6048.94 ▲6.02
Requests /wp-admin/admin.php?page=wp-gdpr-compliance-requests1,6707.11171.01106.37
Settings /wp-admin/admin.php?page=wp-gdpr-compliance-settings3,1937.11168.5560.28
Wizard /wp-admin/admin.php?page=wp-gdpr-compliance-wizard1,0664.8975.4616.67
Dashboard /wp-admin/admin.php?page=wp-gdpr-compliance1,9027.22150.9250.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_wpgdprc_consents
    • wp_wpgdprc_log
    • wp_wpgdprc_delete_requests
    • wp_wpgdprc_access_requests
  • Zombie WordPress options were found after uninstall: 15 options
    • wpgdprc_settings_enable_access_request
    • wpgdprc_activated
    • wpgdprc_settings_enable_premium_mode
    • wpgdprc_form_last_shown
    • widget_theysaidso_widget
    • wpgdprc_db_version_consents
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-gdpr-compliance/Templates/Front/Form/AccessRequest/Submit/success.php
  • 119× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPGDPRC\\Utils\\Template' not found in wp-content/plugins/wp-gdpr-compliance/Templates/Front/Consent/adminBar.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPGDPRC\\WordPress\\Admin\\Pages\\PageDashboard' not found in wp-content/plugins/wp-gdpr-compliance/Templates/Admin/Pages/Processors/main.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-gdpr-compliance/Templates/Admin/Elements/notice-fancy.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/wp-gdpr-compliance/Templates/Front/Elements/error.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_key() in wp-content/plugins/wp-gdpr-compliance/Templates/Admin/Form/field-textarea.php:13
    • > PHP Warning
      key() expects parameter 1 to be array, null given in wp-content/plugins/wp-gdpr-compliance/Templates/Admin/Pages/Settings/main.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'WPGDPRC\\Objects\\AbstractObject' not found in wp-content/plugins/wp-gdpr-compliance/Objects/DataProcessor.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/wp-gdpr-compliance/Templates/Front/Form/AccessRequest/Submit/notice.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-gdpr-compliance/Templates/Admin/banner.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPGDPRC\\Integrations\\AbstractIntegration' not found in wp-content/plugins/wp-gdpr-compliance/Integrations/Plugins/AbstractPlugin.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=wp-gdpr-compliance-wizard
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-gdpr-compliance/Assets/js/admin.min.js?ver=1651571244 0:229922 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-gdpr-compliance/wp-gdpr-compliance.php 92% from 13 tests

The entry point to "Cookie Information | Free GDPR Consent Solution" version 2.0.22 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("/Resources/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin19,771 lines of code in 277 files:
LanguageFilesBlank linesComment linesLines of code
PHP1612,4174,21011,050
Sass50738473,541
JavaScript426227633,382
PO File13954681,493
SVG1800191
XML2111497
JSON10015
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.38
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes79
▷ Abstract classes1113.92%
▷ Concrete classes6886.08%
▷ Final classes00.00%
Methods861
▷ Static methods50058.07%
▷ Public methods78290.82%
▷ Protected methods758.71%
▷ Private methods40.46%
Functions25
▷ Named functions14.00%
▷ Anonymous functions2496.00%
Constants145
▷ Global constants53.45%
▷ Class constants14096.55%
▷ Public constants140100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin