10% puredevs-gdpr-compliance

Code Review | PureDevs GDPR compliance

WordPress plugin PureDevs GDPR compliance scored 10% from 54 tests.

About plugin

  • Plugin page: puredevs-gdpr-com...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jan 21, 2020
  • Latest release: Aug 29, 2023
  • Number of updates: 9
  • Update frequency: every 147.9 days
  • Top authors: puredevs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 720 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

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

This is a short check of server-side resources used by PureDevs GDPR compliance
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2737.23 ▲1.40
Dashboard /wp-admin4.08 ▲0.7854.41 ▲2.69
Posts /wp-admin/edit.php4.13 ▲0.7852.85 ▲5.33
Add New Post /wp-admin/post-new.php6.60 ▲0.7191.12 ▼10.89
Media Library /wp-admin/upload.php3.92 ▲0.6942.15 ▲3.46
PureDevs GDPR Compliance /wp-admin/options-general.php?page=pure_gdpr_cookie_settings4.1042.63

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 19 new options
New WordPress options
widget_recent-posts
puredevs_privacy_and_policy_settings
puredevs_additional_cookie_settings
puredevs_required_cookies_settings
puredevs_strictly_necessary_cookie_settings
puredevs_export_import_settings
puredevs_banner_settings
puredevs_privacy_overview_settings
puredevs_button_settings
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for PureDevs GDPR compliance
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,335 ▲58915.48 ▲1.328.37 ▲6.4542.90 ▲2.65
Dashboard /wp-admin2,374 ▲1826.65 ▲1.70121.41 ▲3.0236.26 ▼1.91
Posts /wp-admin/edit.php2,289 ▲2003.72 ▲1.6848.19 ▲7.2729.44 ▼1.67
Add New Post /wp-admin/post-new.php1,700 ▲17222.62 ▼0.64595.00 ▼74.5730.50 ▼29.36
Media Library /wp-admin/upload.php1,416 ▲254.41 ▲0.1987.22 ▼17.6741.44 ▼9.66
PureDevs GDPR Compliance /wp-admin/options-general.php?page=pure_gdpr_cookie_settings5,54515.81504.8041.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • The uninstall procedure has failed, leaving 19 options in the database
    • puredevs_functional_cookie_settings
    • puredevs_required_cookies_settings
    • puredevs_3rd_party_cookie_settings
    • puredevs_geo_location_settings
    • puredevs_privacy_and_policy_settings
    • puredevs_privacy_overview_settings
    • theysaidso_admin_options
    • puredevs_strictly_necessary_cookie_settings
    • puredevs_export_import_settings
    • puredevs_additional_cookie_settings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/puredevs-gdpr-compliance/admin/partials/pd_gdpr-admin-display.php
    • > /wp-content/plugins/puredevs-gdpr-compliance/public/partials/pd_gdpr-public-display.php
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php:58
    • > PHP Notice
      Undefined variable: pd_banner_settings in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php on line 2
    • > PHP Notice
      Undefined variable: pd_banner_settings in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/puredevs-gdpr-compliance/admin/ajax_functions.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Pd_gdpr' not found in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-complience-modal.php:6
    • > PHP Notice
      Undefined variable: pd_general_settings in wp-content/plugins/puredevs-gdpr-compliance/public/templates/pd-gdpr-bar.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/puredevs-gdpr-compliance/public/partials/shortcode.php:67

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: compliance, gdpr regulation, wordpress gdpr, gdpr compliance, policy...

puredevs-gdpr-compliance/puredevs-gdpr-complience.php 77% from 13 tests

The primary PHP file in "PureDevs GDPR compliance" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("puredevs-gdpr-compliance.php" instead of "puredevs-gdpr-complience.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected7,019 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP182589252,772
SVG1002,105
CSS3100241,541
JavaScript211980601

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity21.50
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods86
▷ Static methods910.47%
▷ Public methods8194.19%
▷ Protected methods00.00%
▷ Private methods55.81%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/puredevs-gdpr-logo.png4.96KB2.66KB▼ 46.31%