78% divertdigital-gdpr

Code Review | DivertDigital GDPR

WordPress plugin DivertDigital GDPR scored78%from 54 tests.

About plugin

  • Plugin page: divertdigital-gdpr
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 28, 2018
  • Latest release: May 15, 2018
  • Number of updates: 12
  • Update frequency: every 4.5 days
  • Top authors: zeddivert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,064 total downloads

Benchmarks

Plugin footprint 82% 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: ▲0.86MB] [CPU: ▲2.11ms] Passed 4 tests

Analyzing server-side resources used by DivertDigital GDPR
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8846.58 ▲5.19
Dashboard /wp-admin4.15 ▲0.8556.24 ▲4.81
Posts /wp-admin/edit.php4.27 ▲0.9156.29 ▲6.81
Add New Post /wp-admin/post-new.php6.74 ▲0.8591.99 ▼8.38
Media Library /wp-admin/upload.php4.08 ▲0.8548.76 ▲13.31
GDPR /wp-admin/options-general.php?page=gdpr-settings-page4.0540.41

Server storage [IO: ▲1.18MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/divertdigital-gdpr/" and "wp-content/uploads/"
    • (new file) wp-content/enc_keys/.empty
    • (new file) wp-content/deleted_users/.empty
Filesystem: 136 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
divertdigital-gdpr-version
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for DivertDigital GDPR
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.36 ▲0.021.67 ▼1.2041.74 ▲1.39
Dashboard /wp-admin2,199 ▲225.64 ▲0.0588.38 ▲1.8938.88 ▼3.89
Posts /wp-admin/edit.php2,107 ▲102.07 ▼0.0935.16 ▼5.3333.08 ▼6.89
Add New Post /wp-admin/post-new.php1,528 ▲222.51 ▼1.02680.31 ▼3.2852.48 ▼10.61
Media Library /wp-admin/upload.php1,407 ▲134.21 ▼0.1898.41 ▼2.9245.42 ▲0.23
GDPR /wp-admin/options-general.php?page=gdpr-settings-page8272.0023.7829.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • divertdigital-gdpr-version

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
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/divertdigital-gdpr/dd_gdpr.php
  • 66× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Util' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/src/Core32/Util.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'other/ide_stubs/libsodium.php' (include_path='.:/usr/share/php') in wp-content/plugins/divertdigital-gdpr/lib/random_compat-2.0.11/psalm-autoload.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/src/Core/X25519.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519_Fe' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/namespaced/Core/Curve25519/Fe.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/src/Core/Ed25519.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core32_Util' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/src/Core32/ChaCha20.php:10
    • > PHP Warning
      constant(): Couldn't find constant ParagonIE_Sodium_Compat::CRYPTO_KX_BYTES in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/lib/php72compat.php on line 66
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_ChaCha20_Ctx' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/namespaced/Core/ChaCha20/Ctx.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core32_ChaCha20' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/src/Core32/HChaCha20.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519_Ge_P3' not found in wp-content/plugins/divertdigital-gdpr/lib/sodium_compat-1.5.6/namespaced/Core/Curve25519/Ge/P3.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
2 plugin tags: gdpr, pseudonimization

divertdigital-gdpr/dd_gdpr.php 92% from 13 tests

Analyzing the main PHP file in "DivertDigital GDPR" version 1.0.4
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("divertdigital-gdpr.php" instead of "dd_gdpr.php")

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
Everything looks great! No dangerous files found in this plugin21,410 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1182,2878,29420,980
Markdown2640216
JSON300136
XML20044
make19426
Bourne Shell2418

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity17.95
▷ Minimum class complexity1.00
▷ Maximum class complexity338.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes87
▷ Abstract classes2022.99%
▷ Concrete classes6777.01%
▷ Final classes00.00%
Methods643
▷ Static methods41364.23%
▷ Public methods56487.71%
▷ Protected methods6810.58%
▷ Private methods111.71%
Functions140
▷ Named functions13999.29%
▷ Anonymous functions10.71%
Constants202
▷ Global constants73.47%
▷ Class constants19596.53%
▷ Public constants195100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin