84% gdpr

Code Review | GDPR

WordPress plugin GDPR scored 84% from 54 tests.

About plugin

  • Plugin page: gdpr
  • Plugin version: 2.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Feb 16, 2018
  • Latest release: May 14, 2020
  • Number of updates: 75
  • Update frequency: every 10.9 days
  • Top authors: fclaussen (98.67%)trewknowledge (2.67%)

Code review

54 tests

User reviews

57 reviews

Install metrics

20,000+ active / 361,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.70MB] [CPU: ▼2.23ms] Passed 4 tests

Server-side resources used by GDPR
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7741.87 ▼2.82
Dashboard /wp-admin4.03 ▲0.7349.20 ▲4.31
Posts /wp-admin/edit.php4.08 ▲0.7354.09 ▲4.26
Add New Post /wp-admin/post-new.php6.59 ▲0.7089.94 ▼14.66
Media Library /wp-admin/upload.php3.89 ▲0.6637.98 ▲5.40
Settings /wp-admin/admin.php?page=gdpr-settings4.1040.11
Requests /wp-admin/admin.php?page=gdpr-requests3.9736.80
Tools /wp-admin/admin.php?page=gdpr-tools3.8834.84

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 18 new options
New WordPress options
gdpr_enable_privacy_bar
gdpr_add_consent_checkboxes_checkout
can_compress_scripts
theysaidso_admin_options
gdpr_recaptcha_site_key
widget_theysaidso_widget
gdpr_hide_from_bots
gdpr_cookie_popup_content
gdpr_display_cookie_categories_in_bar
gdpr_recaptcha_secret_key
...

Browser metrics Passed 4 tests

An overview of browser requirements for GDPR
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,116 ▲37013.85 ▼0.938.30 ▲6.4243.82 ▼0.16
Dashboard /wp-admin2,228 ▲435.04 ▼0.87106.48 ▲6.3438.55 ▼5.69
Posts /wp-admin/edit.php2,130 ▲412.42 ▲0.4249.95 ▲10.3637.98 ▲5.10
Add New Post /wp-admin/post-new.php1,542 ▲2821.12 ▲3.62580.64 ▼48.4926.85 ▼41.60
Media Library /wp-admin/upload.php1,412 ▲274.25 ▼0.01100.06 ▲1.3340.95 ▼0.05
Settings /wp-admin/admin.php?page=gdpr-settings2,1682.2033.7144.66
Requests /wp-admin/admin.php?page=gdpr-requests1,1041.9530.7027.91
Tools /wp-admin/admin.php?page=gdpr-tools1,1081.9627.6127.01

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
  • Zombie WordPress options detected upon uninstall: 18 options
    • gdpr_enable_privacy_bar
    • db_upgraded
    • gdpr_hide_from_bots
    • gdpr_cookie_popup_content
    • gdpr_recaptcha_site_key
    • gdpr_disable_css
    • widget_recent-comments
    • gdpr_add_consent_checkboxes_registration
    • gdpr_refresh_after_preferences_update
    • gdpr_display_cookie_categories_in_bar
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 31× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/gdpr/public/partials/confirmation-screens.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gdpr/admin/partials/templates/tmpl-tools.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gdpr/admin/partials/templates/tmpl-consents.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gdpr/public/class-gdpr-public.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gdpr/admin/partials/tools.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gdpr/templates/privacy-preferences-modal.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gdpr/templates/forms/export-data-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gdpr/admin/partials/templates/tmpl-cookies.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gdpr/templates/reconsent-bar.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/gdpr/templates/email/delete-resolved.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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: law, privacy, general data protection regulation, compliance, gdpr

gdpr/gdpr.php 92% from 13 tests

The primary PHP file in "GDPR" version 2.1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 166 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
Success! There were no dangerous files found in this plugin16,637 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
JSON30012,078
PHP435481,2394,345
Markdown1580106
JavaScript39694
XML10012
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity31.25
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods100
▷ Static methods2929.00%
▷ Public methods8585.00%
▷ Protected methods55.00%
▷ Private methods1010.00%
Functions22
▷ Named functions1359.09%
▷ Anonymous functions940.91%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected