83% gdpr-for-gravity-forms

Code Review | Gravity Forms: GDPR Framework Add-On

WordPress plugin Gravity Forms: GDPR Framework Add-On scored 83% from 54 tests.

About plugin

  • Plugin page: gdpr-for-gravity-...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: Jul 28, 2022
  • Number of updates: 25
  • Update frequency: every 62.6 days
  • Top authors: data443 (64%)indrek_k (40%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active / 16,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.91ms] Passed 4 tests

Analyzing server-side resources used by Gravity Forms: GDPR Framework Add-On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.47 ▼0.86
Dashboard /wp-admin3.31 ▲0.0046.29 ▼3.73
Posts /wp-admin/edit.php3.36 ▲0.0044.96 ▼5.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.37 ▼13.54
Media Library /wp-admin/upload.php3.23 ▲0.0035.04 ▲0.98

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms: GDPR Framework Add-On
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.45 ▲0.041.76 ▼0.0840.50 ▲1.54
Dashboard /wp-admin2,206 ▲184.83 ▼1.20103.57 ▼8.4939.73 ▼3.79
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0536.89 ▼4.8933.64 ▼2.94
Add New Post /wp-admin/post-new.php1,534 ▲123.31 ▲0.11666.89 ▲11.1754.81 ▲2.42
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0395.59 ▼7.3742.32 ▼1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gdpr-for-gravity-forms/src/GravityFormsGDPRAddOn.php:5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/gdpr-for-gravity-forms/gravityforms-gdpr.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gdpr-for-gravity-forms/gravityforms-gdpr.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/gdpr-for-gravity-forms/gravityforms-gdpr.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: gravity forms, privacy, security, ccpa, compliance...

gdpr-for-gravity-forms/gravityforms-gdpr.php 69% from 13 tests

"Gravity Forms: GDPR Framework Add-On" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gdpr-for-gravity-forms.php" instead of "gravityforms-gdpr.php")
  • Domain Path: The domain path folder was not found ("/languages")
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.3" instead of "5.6")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected392 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP38028392

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity28.50
▷ Minimum class complexity8.00
▷ Maximum class complexity49.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected