72% gdpr-compliance-by-supsystic

Code Review | GDPR Cookie Consent by Supsystic

WordPress plugin GDPR Cookie Consent by Supsystic scored72%from 54 tests.

About plugin

  • Plugin page: gdpr-compliance-b...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 16, 2018
  • Latest release: Aug 30, 2022
  • Number of updates: 31
  • Update frequency: every 49.6 days
  • Top authors: supsystic.com (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /22,590 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.18MB] [CPU: ▼5.99ms] 75% from 4 tests

This is a short check of server-side resources used by GDPR Cookie Consent by Supsystic
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 830.08ms on /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=overview)
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2346.11 ▲4.74
Dashboard /wp-admin3.50 ▲0.1550.25 ▼8.86
Posts /wp-admin/edit.php3.55 ▲0.1950.51 ▼5.81
Add New Post /wp-admin/post-new.php6.08 ▲0.1980.28 ▼12.70
Media Library /wp-admin/upload.php3.42 ▲0.1938.30 ▲3.42
Settings /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=gdpr-settings3.6737.00
Overview /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=overview3.76830.08
GDPR Compliance by Supsystic /wp-admin/admin.php?page=gdpr-compliance-by-supsystic3.6342.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 135 new files
Database: no new tables, 10 new options
New WordPress options
gdprsup_plugin_activation_errors
widget_recent-comments
widget_recent-posts
gdprsup_opts_data
widget_theysaidso_widget
wp_gdprsup_db_version
theysaidso_admin_options
db_upgraded
can_compress_scripts
wp_gdprsup_db_installed

Browser metrics Passed 4 tests

GDPR Cookie Consent by Supsystic: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,051 ▲29013.70 ▼0.6520.34 ▲18.8246.75 ▲6.64
Dashboard /wp-admin2,230 ▲505.66 ▲0.0894.94 ▲7.4841.80 ▲2.52
Posts /wp-admin/edit.php2,132 ▲322.02 ▲0.0132.91 ▼1.0235.18 ▼5.52
Add New Post /wp-admin/post-new.php1,557 ▲3123.28 ▲0.20684.32 ▲15.4065.95 ▲16.04
Media Library /wp-admin/upload.php1,429 ▲264.20 ▲0.0399.44 ▼4.4341.29 ▼2.45
Settings /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=gdpr-settings4,27110.64295.22127.71
Overview /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=overview2,59417.29512.4892.22
GDPR Compliance by Supsystic /wp-admin/admin.php?page=gdpr-compliance-by-supsystic4,26810.73294.49120.53

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 were found after uninstall: 8 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • gdprsup_plugin_activation_errors
    • gdprsup_opts_data

Smoke tests 25% 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)
Almost there, just fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic
    • > Notice in wp-content/plugins/gdpr-compliance-by-supsystic/modules/options/views/tpl/optionsAdminPage.php+45
    Undefined property: optionsViewGdprsup::$mainLink

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 take a closer look at the following
  • 53× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'baseObjectGdprsup' not found in wp-content/plugins/gdpr-compliance-by-supsystic/classes/model.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gdpr-compliance-by-supsystic/modules/gdpr/views/tpl/gdprAgreementAndScripts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'controllerGdprsup' not found in wp-content/plugins/gdpr-compliance-by-supsystic/modules/mail/controller.php:2
    • > PHP Warning
      Use of undefined constant GDPRSUP_PLUG_NAME - assumed 'GDPRSUP_PLUG_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/gdpr-compliance-by-supsystic/modules/supsystic_promo/views/tpl/overviewTabContent.php on line 3
    • > PHP Warning
      Use of undefined constant GDPRSUP_WP_PLUGIN_NAME - assumed 'GDPRSUP_WP_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/gdpr-compliance-by-supsystic/modules/pages/views/tpl/deactivatePage.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'modelGdprsup' not found in wp-content/plugins/gdpr-compliance-by-supsystic/modules/mail/models/mail.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'moduleGdprsup' not found in wp-content/plugins/gdpr-compliance-by-supsystic/modules/adminmenu/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'controllerGdprsup' not found in wp-content/plugins/gdpr-compliance-by-supsystic/modules/supsystic_promo/controller.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gdpr-compliance-by-supsystic/config.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'modelGdprsup' not found in wp-content/plugins/gdpr-compliance-by-supsystic/modules/gdpr/models/gdpr.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic
    • > Network (severe)
    http://supsystic-42d7.kxcdn.com/lib/tooltipster/tooltipster.css?ver=2.1.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic
    • > Network (severe)
    http://supsystic-42d7.kxcdn.com/lib/chosen/chosen.min.css?ver=2.1.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic
    • > Network (severe)
    http://supsystic-42d7.kxcdn.com/lib/tooltipster/jquery.tooltipster.min.js?ver=2.1.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic
    • > Network (severe)
    http://supsystic-42d7.kxcdn.com/lib/chosen/chosen.jquery.min.js?ver=2.1.2 - Failed to load resource: net::ERR_CONNECTION_RESET
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=overview
    • > Network (severe)
    http://supsystic-42d7.kxcdn.com/js/jquery.slimscroll.js?ver=2.1.2 - Failed to load resource: net::ERR_CONNECTION_RESET
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=overview
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).slimScroll is not a function" "TypeError: jQuery(...).slimScroll is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/gdpr-compliance-by-supsystic/modules/supsystic_promo/js/admin.overview.js?ver=2.1.2:14:45)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=gdpr-compliance-by-supsystic&tab=overview
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).slimScroll is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: cookie consent, gdpr, cookie popup, gdpr compliance, cookie notification...

gdpr-compliance-by-supsystic/gdprsup.php 92% from 13 tests

This is the main PHP file of "GDPR Cookie Consent by Supsystic" version 2.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gdpr-compliance-by-supsystic.php" instead of "gdprsup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin11,954 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
PHP732441,1127,772
CSS181271672,179
JavaScript14462132,003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity24.16
▷ Minimum class complexity1.00
▷ Maximum class complexity194.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes712.73%
▷ Concrete classes4887.27%
▷ Final classes00.00%
Methods670
▷ Static methods25137.46%
▷ Public methods61391.49%
▷ Protected methods405.97%
▷ Private methods172.54%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants69
▷ Global constants6492.75%
▷ Class constants57.25%
▷ Public constants5100.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
26 PNG files occupy 0.37MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/supsystic_promo/img/overview-03.png258.26KB78.45KB▼ 69.62%
css/images/minimal.png2.23KB1.44KB▼ 35.45%
css/images/ui-icons_f29a00_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_highlight-hard_15_888888_1x100.png0.25KB0.14KB▼ 43.82%
css/images/ui-icons_c98000_256x240.png4.44KB4.17KB▼ 6.02%