62% lgpd-framework

Code Review | LGPD Framework By Data443

WordPress plugin LGPD Framework By Data443 scored62%from 54 tests.

About plugin

  • Plugin page: lgpd-framework
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2020
  • Latest release: Mar 30, 2023
  • Number of updates: 44
  • Update frequency: every 21.6 days
  • Top authors: data443 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,144 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.56MB] [CPU: ▲14.70ms] Passed 4 tests

A check of server-side resources used by LGPD Framework By Data443
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9142.48 ▲7.38
Dashboard /wp-admin5.12 ▲1.8259.49 ▲15.93
Posts /wp-admin/edit.php5.18 ▲1.8263.42 ▲18.44
Add New Post /wp-admin/post-new.php7.65 ▲1.76107.94 ▲21.68
Media Library /wp-admin/upload.php4.99 ▲1.7650.69 ▲17.03
Data443 LGPD /wp-admin/tools.php?page=lgpd_privacy5.0250.23
/wp-admin/index.php?page=lgpd-setup4.8539.83
Privacy Tools /wp-admin/users.php?page=lgpd-profile5.0252.26

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 276 new files
Database: 2 new tables, 11 new options
New tables
wp_lgpd_userlogs
wp_lgpd_consent
New WordPress options
wp_lgpd_consent_db_version
widget_theysaidso_widget
widget_recent-comments
lgpd_enable_stylesheet
theysaidso_admin_options
wp_lgpd_userlogs_db_version
widget_recent-posts
lgpd_enable
can_compress_scripts
lgpd_plugin_version
...

Browser metrics Passed 4 tests

LGPD Framework By Data443: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17014.35 ▲0.001.56 ▼0.0641.67 ▲1.45
Dashboard /wp-admin2,325 ▲1485.56 ▼0.0481.08 ▼4.9175.97 ▲36.90
Posts /wp-admin/edit.php2,245 ▲1452.13 ▲0.0940.80 ▲7.2534.58 ▼7.31
Add New Post /wp-admin/post-new.php1,657 ▲13023.58 ▲0.14707.47 ▲45.6259.93 ▲7.03
Media Library /wp-admin/upload.php1,533 ▲1334.22 ▲0.01107.75 ▲0.2679.40 ▲32.04
Data443 LGPD /wp-admin/tools.php?page=lgpd_privacy1,5812.7552.8739.50
/wp-admin/index.php?page=lgpd-setup280.420.083.79
Privacy Tools /wp-admin/users.php?page=lgpd-profile9742.0024.1328.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_lgpd_userlogs
    • wp_lgpd_consent
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • widget_recent-comments
    • lgpd_plugin_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp_lgpd_consent_db_version
    • wp_lgpd_userlogs_db_version
    • lgpd_enable
    • lgpd_enable_stylesheet
    • ...

Smoke tests 25% 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 | 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
  • 17× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/lgpd-framework/views/installer/steps/integrations.php
    • > /wp-content/plugins/lgpd-framework/views/admin/notices/footer.php
    • > /wp-content/plugins/lgpd-framework/views/admin/notices/installer-finished.php
    • > /wp-content/plugins/lgpd-framework/views/admin/general/name_from.php
    • > /wp-content/plugins/lgpd-framework/views/admin/general/email_from.php
    • > /wp-content/plugins/lgpd-framework/views/admin/cookie-popup/popup_background_color_picker.php
    • > /wp-content/plugins/lgpd-framework/views/admin/advanced-integration/header.php
    • > /wp-content/plugins/lgpd-framework/views/admin/notices/footer-step.php
    • > /wp-content/plugins/lgpd-framework/views/installer/steps/welcome.php
    • > /wp-content/plugins/lgpd-framework/views/admin/privacy-policy/company-location.php
  • 187× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/lgpd-framework/views/global/country-options.php on line 18
    • > PHP Notice
      Undefined variable: consentData in wp-content/plugins/lgpd-framework/views/modules/wordpress-user/dashboard/data-page/form-consent.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lgpd-framework/views/email/no-data.php:2
    • > PHP Warning
      Use of undefined constant ES_PLUGIN_FILE - assumed 'ES_PLUGIN_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/lgpd-framework/src/Modules/NewsletterCcpa/NewsletterCcpa.php on line 8
    • > PHP Notice
      Undefined variable: isThemeSupported in wp-content/plugins/lgpd-framework/views/installer/steps/integrations.php on line 10
    • > PHP Warning
      Use of undefined constant EDD_PLUGIN_DIR - assumed 'EDD_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/lgpd-framework/src/Modules/EddCcpa/EddCcpa.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lgpd() in wp-content/plugins/lgpd-framework/views/admin/general/delete-action.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lgpd() in wp-content/plugins/lgpd-framework/views/installer/steps/configuration-pages.php:19
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/lgpd-framework/views/admin/cookie-popup/enable_popup_learnmore_content.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Data443\\LGPD\\Admin\\AdminTab' not found in wp-content/plugins/lgpd-framework/src/Components/PrivacyPolicy/AdminTabPrivacyPolicy.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/index.php?page=lgpd-setup
    • > Network (severe)
    wp-admin/index.php?page=lgpd-setup - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add a description for screenshot #5 in lgpd-framework/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

lgpd-framework/lgpd-framework.php Passed 13 tests

Analyzing the main PHP file in "LGPD Framework By Data443" version 2.0.2
100 characters long description:
Tools to help make your website LGPD-compliant. Fully documented, extendable and developer-friendly.

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
Everything looks great! No dangerous files found in this plugin20,728 lines of code in 240 files:
LanguageFilesBlank linesComment linesLines of code
PHP2101,7701,9389,512
PO File42,4552,9728,735
CSS8340141,811
JavaScript154971667
SVG3003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.35
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces27
Interfaces2
Traits0
Classes78
▷ Abstract classes45.13%
▷ Concrete classes7494.87%
▷ Final classes00.00%
Methods527
▷ Static methods00.00%
▷ Public methods45886.91%
▷ Protected methods6812.90%
▷ Private methods10.19%
Functions21
▷ Named functions1466.67%
▷ Anonymous functions733.33%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
26 PNG files occupy 0.61MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-sortable.png0.38KB0.29KB▼ 22.94%
images/screenshot-5.png16.33KB7.35KB▼ 54.97%
assets/icon-225x225.png6.11KB3.05KB▼ 50.06%
assets/images/sort_asc.png0.16KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%