78% gdpr-compliance-tool

Code Review | Consent Management Platform

WordPress plugin Consent Management Platform scored78%from 54 tests.

About plugin

  • Plugin page: gdpr-compliance-tool
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2018
  • Latest release: Nov 30, 2022
  • Number of updates: 21
  • Update frequency: every 77.2 days
  • Top authors: ShareThis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼0.84ms] Passed 4 tests

An overview of server-side resources used by Consent Management Platform
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.13 ▼2.41
Dashboard /wp-admin3.45 ▲0.1552.32 ▲3.75
Posts /wp-admin/edit.php3.57 ▲0.2152.58 ▲7.07
Add New Post /wp-admin/post-new.php6.03 ▲0.1594.62 ▼8.50
Media Library /wp-admin/upload.php3.38 ▲0.1538.67 ▲3.81

Server storage [IO: ▲0.54MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Consent Management Platform
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲14313.79 ▼0.601.75 ▼0.2443.54 ▼11.79
Dashboard /wp-admin2,271 ▲834.88 ▼1.03102.24 ▲1.4437.66 ▼6.28
Posts /wp-admin/edit.php2,150 ▲612.05 ▲0.0640.36 ▲0.9736.64 ▲4.04
Add New Post /wp-admin/post-new.php1,523 ▲917.36 ▼0.17638.50 ▼38.5154.56 ▲1.05
Media Library /wp-admin/upload.php1,447 ▲594.22 ▼0.0098.15 ▲2.7340.53 ▼4.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gdpr-compliance-tool/templates/gdpr-config.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GDPRComplianceTool\\Plugin_Base' not found in wp-content/plugins/gdpr-compliance-tool/php/class-plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GDPRComplianceTool\\trailingslashit() in wp-content/plugins/gdpr-compliance-tool/php/class-plugin-base.php:149
    • > PHP Fatal error
      Uncaught Error: Call to undefined function GDPRComplianceTool\\trailingslashit() in wp-content/plugins/gdpr-compliance-tool/php/class-plugin-base.php:149
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/gdpr-compliance-tool/templates/gdpr-compliance-settings.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
7 plugin tags: sharethis, eu, share this, cookies, compliance...

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

The entry point to "Consent Management Platform" version 2.1.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected557 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8132362552
CSS1104
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity26.67
▷ Minimum class complexity6.00
▷ Maximum class complexity53.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2787.10%
▷ Protected methods13.23%
▷ Private methods39.68%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin