76% shapepress-dsgvo

Code Review | WP DSGVO Tools (GDPR)

WordPress plugin WP DSGVO Tools (GDPR) scored76%from 54 tests.

About plugin

  • Plugin page: shapepress-dsgvo
  • Plugin version: 3.1.31
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2018
  • Latest release: Sep 7, 2023
  • Number of updates: 350
  • Update frequency: every 5.6 days
  • Top authors: shapepress (78.57%)legalweb (21.14%)

Code review

54 tests

User reviews

115 reviews

Install metrics

20,000+ active /959,818 total downloads

Benchmarks

Plugin footprint 81% 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: ▲1.70MB] [CPU: ▲292.29ms] 50% from 4 tests

An overview of server-side resources used by WP DSGVO Tools (GDPR)
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 587.30ms on /wp-admin/admin.php?page=sp-dsgvo&tab=embeddings-integrations)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 292.29ms on /wp-admin/admin.php?page=sp-dsgvo&tab=embeddings-integrations)
PageMemory (MB)CPU Time (ms)
Home /5.85 ▲2.39437.96 ▲402.90
Dashboard /wp-admin5.12 ▲1.82346.05 ▲299.27
Posts /wp-admin/edit.php5.12 ▲1.76307.73 ▲258.38
Add New Post /wp-admin/post-new.php7.20 ▲1.32342.27 ▲251.08
Media Library /wp-admin/upload.php5.12 ▲1.89395.44 ▲360.43
Cookie Notice / Popup /wp-admin/admin.php?page=sp-dsgvo&tab=cookie-notice5.123,692.87
Delete request /wp-admin/admin.php?page=sp-dsgvo&tab=super-unsubscribe5.12293.82
Statistics /wp-admin/admin.php?page=sp-dsgvo&tab=statistic-integrations5.12348.13
Tagmanager /wp-admin/admin.php?page=sp-dsgvo&tab=tagmanager-integrations5.12322.33
Targeting /wp-admin/admin.php?page=sp-dsgvo&tab=targeting-integrations5.12321.36
Operator /wp-admin/admin.php?page=sp-dsgvo&tab=operator5.12303.63
Free Webinars /wp-admin/admin.php?page=sp-dsgvo&tab=webinars5.12316.53
Page Basics /wp-admin/admin.php?page=sp-dsgvo&tab=page-basics5.12318.15
Common /wp-admin/admin.php?page=sp-dsgvo5.12319.02
Embeddings /wp-admin/admin.php?page=sp-dsgvo&tab=embeddings-integrations5.67587.30

Server storage [IO: ▲34.63MB] [DB: ▲0.56MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Just a few items left to fix
  • Filesystem usage must be lower than 25MB (currently using 34.63MB)
Filesystem: 582 new files
Database: no new tables, 13 new options
New WordPress options
theysaidso_admin_options
sp_dsgvo_legal_web_texts
widget_recent-posts
sp_dsgvo_legal_web_texts_last_update
sp_dsgvo_legal_web_texts_last_check
widget_recent-comments
db_upgraded
sp_dsgvo_legal_web_texts_lang
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by WP DSGVO Tools (GDPR)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,529 ▲75815.85 ▲1.4727.50 ▲25.66134.74 ▲93.97
Dashboard /wp-admin2,522 ▲3376.72 ▲0.84146.13 ▲45.0261.81 ▲20.36
Posts /wp-admin/edit.php2,438 ▲3493.73 ▲1.7550.30 ▲9.8349.88 ▲12.97
Add New Post /wp-admin/post-new.php1,609 ▲9021.21 ▼2.22647.65 ▼62.2342.71 ▼12.03
Media Library /wp-admin/upload.php1,562 ▲1744.48 ▲0.3398.56 ▼10.0972.80 ▲26.09
Cookie Notice / Popup /wp-admin/admin.php?page=sp-dsgvo&tab=cookie-notice2,2013.4949.87105.62
Delete request /wp-admin/admin.php?page=sp-dsgvo&tab=super-unsubscribe2,3326.55139.49178.59
Statistics /wp-admin/admin.php?page=sp-dsgvo&tab=statistic-integrations2,2803.3454.0287.55
Tagmanager /wp-admin/admin.php?page=sp-dsgvo&tab=tagmanager-integrations1,5603.3845.58124.55
Targeting /wp-admin/admin.php?page=sp-dsgvo&tab=targeting-integrations1,9453.3349.2578.76
Operator /wp-admin/admin.php?page=sp-dsgvo&tab=operator3,4323.4746.0070.60
Free Webinars /wp-admin/admin.php?page=sp-dsgvo&tab=webinars1,4263.3147.9788.64
Page Basics /wp-admin/admin.php?page=sp-dsgvo&tab=page-basics3,9769.94216.9284.92
Common /wp-admin/admin.php?page=sp-dsgvo1,9823.3947.4676.46
Embeddings /wp-admin/admin.php?page=sp-dsgvo&tab=embeddings-integrations2,3543.4445.22124.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 14× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/shapepress-dsgvo/templates/de_DE/emails/footer.php
    • > /wp-content/plugins/shapepress-dsgvo/public/inc/cookie-popup-styles.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/en_GB/emails/header.php
    • > /wp-content/plugins/shapepress-dsgvo/public/inc/bootstrap-grid.min.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/de_DE_formal/emails/header.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/en_EN/emails/header.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/de_DE/emails/legal-texts-update.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/de_DE/emails/header.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/de_DE_formal/emails/footer.php
    • > /wp-content/plugins/shapepress-dsgvo/templates/en_EN/emails/footer.php
  • 170× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shapepress-dsgvo/public/shortcodes/privacy-policy.php:515
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOIntegration' not found in wp-content/plugins/shapepress-dsgvo/includes/integrations/tagmanager/matomotagmanager/class-sp-dsgvo-matomo-tagmanager-integration.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOAjaxAction' not found in wp-content/plugins/shapepress-dsgvo/public/actions/popup-accept.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOAjaxAction' not found in wp-content/plugins/shapepress-dsgvo/admin/tabs/gravity-forms/class-sp-dsgvo-gravity-forms-action.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOAjaxAction' not found in wp-content/plugins/shapepress-dsgvo/admin/tabs/v3/common-settings/class-sp-dsgvo-privacy-policy-action.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOAjaxAction' not found in wp-content/plugins/shapepress-dsgvo/admin/class-sp-dsgvo-admin-action.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOEmbeddingApiBase' not found in wp-content/plugins/shapepress-dsgvo/includes/integrations/embeddings/instagram/class-sp-dsgvo-instagram-api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function isValidPremiumEdition() in wp-content/plugins/shapepress-dsgvo/admin/tabs/v3/operator/page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function isValidPremiumEdition() in wp-content/plugins/shapepress-dsgvo/admin/tabs/v3/stats/page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'SPDSGVOIntegration' not found in wp-content/plugins/shapepress-dsgvo/includes/integrations/targeting/gadsense/class-sp-dsgvo-gadsense-integration.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

shapepress-dsgvo/sp-dsgvo.php 85% from 13 tests

"WP DSGVO Tools (GDPR)" version 3.1.31's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shapepress-dsgvo.php" instead of "sp-dsgvo.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 198 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected92,103 lines of code in 352 files:
LanguageFilesBlank linesComment linesLines of code
PHP2956,26920,65581,450
CSS144921345,181
PO File21,6473,8643,776
JavaScript63981561,304
HTML358240
SVG3002106
XML20146

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,420)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 503)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity82.29
▷ Minimum class complexity1.00
▷ Maximum class complexity4,420.00
Average method complexity7.82
▷ Minimum method complexity1.00
▷ Maximum method complexity503.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes146
▷ Abstract classes53.42%
▷ Concrete classes14196.58%
▷ Final classes00.00%
Methods1,742
▷ Static methods21412.28%
▷ Public methods1,25972.27%
▷ Protected methods46626.75%
▷ Private methods170.98%
Functions36
▷ Named functions3391.67%
▷ Anonymous functions38.33%
Constants127
▷ Global constants11288.19%
▷ Class constants1511.81%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
37 PNG files occupy 1.45MB with 0.84MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/cookies/Cookie13.png56.43KB21.62KB▼ 61.69%
public/images/legalwebio-icon.png16.62KB8.51KB▼ 48.78%
admin/images/cookies/Cookie5.png76.75KB24.81KB▼ 67.67%
admin/images/cookies/Cookie14.png29.74KB11.26KB▼ 62.14%
public/images/legalweb.io-icon-white.png10.45KB5.20KB▼ 50.25%