68% gdpr-helper

Code Review | GDPR Helper using CSP

WordPress plugin GDPR Helper using CSP scored68%from 54 tests.

About plugin

  • Plugin page: gdpr-helper
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Sep 9, 2022
  • Number of updates: 8
  • Update frequency: every 1.9 days
  • Top authors: bpassini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /362 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.15MB] [CPU: ▼45.78ms] Passed 4 tests

Server-side resources used by GDPR Helper using CSP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.366.35 ▼40.83
Dashboard /wp-admin3.12 ▼0.2228.36 ▼37.82
Posts /wp-admin/edit.php3.12 ▼0.2328.24 ▼24.62
Add New Post /wp-admin/post-new.php3.12 ▼2.7625.97 ▼79.83
Media Library /wp-admin/upload.php3.12 ▼0.1125.20 ▼13.05
GDPR Helper /wp-admin/options-general.php?page=gh_setting3.1228.08

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
gh_setting
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by GDPR Helper using CSP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲12013.51 ▼0.749.23 ▲7.2238.65 ▼8.87
Dashboard /wp-admin2,210 ▲194.84 ▼0.06105.06 ▼7.5939.73 ▼1.27
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0539.76 ▲3.2534.66 ▼1.60
Add New Post /wp-admin/post-new.php1,548 ▲2918.23 ▼4.78633.70 ▲30.4559.34 ▲7.06
Media Library /wp-admin/upload.php1,392 ▲14.18 ▼0.05104.29 ▼7.4442.77 ▼7.29
GDPR Helper /wp-admin/options-general.php?page=gh_setting1,3193.1739.2633.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/gdpr-helper/includes/backendPage.php+72
    Undefined variable: description
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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
    • > GET request to /wp-admin/options-general.php?page=gh_setting
    • > Notice in wp-content/plugins/gdpr-helper/includes/backendPage.php+72
    Undefined variable: description

SRP 50% 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
The following issues need your attention
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gdpr-helper/includes/backendPage.php
    • > /wp-content/plugins/gdpr-helper/includes/magicStrings.php
    • > /wp-content/plugins/gdpr-helper/gdpr-helper.php
    • > /wp-content/plugins/gdpr-helper/includes/elementor/helper.php
    • > /wp-content/plugins/gdpr-helper/includes/elementor/widgetShortcode.php
    • > /wp-content/plugins/gdpr-helper/includes/elementor/mapHandler.php
    • > /wp-content/plugins/gdpr-helper/includes/ghMain.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === gdpr-helper === )
The official readme.txt might help

gdpr-helper/gdpr-helper.php Passed 13 tests

The primary PHP file in "GDPR Helper using CSP" version 1.2.1 is used by WordPress to initiate all plugin functionality
75 characters long description:
Set and manage your content-security-policy header to help comply with GDPR

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
Everything looks great! No dangerous files found in this plugin977 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP816773819
CSS28070
JavaScript210252
Markdown322036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods220.00%
▷ Private methods00.00%
Functions29
▷ Named functions2793.10%
▷ Anonymous functions26.90%
Constants23
▷ Global constants417.39%
▷ Class constants1982.61%
▷ Public constants19100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin