78% wp-gdpr-cookie-notice

Code Review | WP GDPR Cookie Notice

WordPress plugin WP GDPR Cookie Notice scored78%from 54 tests.

About plugin

  • Plugin page: wp-gdpr-cookie-no...
  • Plugin version: 1.0.0-rc.2...
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-5.8
  • WordPress version: 6.3.1
  • First release: Mar 1, 2019
  • Latest release: Dec 29, 2021
  • Number of updates: 12
  • Update frequency: every 108.3 days
  • Top authors: flixos90 (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /10,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼2.33ms] Passed 4 tests

This is a short check of server-side resources used by WP GDPR Cookie Notice
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3041.72 ▼0.94
Dashboard /wp-admin3.58 ▲0.2847.78 ▼3.78
Posts /wp-admin/edit.php3.63 ▲0.2847.72 ▲2.11
Add New Post /wp-admin/post-new.php6.16 ▲0.2791.26 ▼1.15
Media Library /wp-admin/upload.php3.50 ▲0.2835.49 ▼3.43
Cookie Notice /wp-admin/customize.php?autofocus[panel]=wp_gdpr_cookie_notice_settings6.65193.11

Server storage [IO: ▲0.30MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 120 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP GDPR Cookie Notice
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲25014.45 ▲0.062.78 ▲0.8137.24 ▼6.94
Dashboard /wp-admin2,213 ▲254.85 ▼0.07107.34 ▼0.1342.05 ▼1.81
Posts /wp-admin/edit.php2,093 ▲252.02 ▼0.0439.32 ▲3.6935.50 ▲0.73
Add New Post /wp-admin/post-new.php1,517 ▼1617.76 ▼5.55659.33 ▼38.2848.86 ▼8.87
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0597.24 ▼13.6441.19 ▼6.15
Cookie Notice /wp-admin/customize.php?autofocus[panel]=wp_gdpr_cookie_notice_settings9,25623.10669.78168.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 83× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Contracts\\Cookie_Integration' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/cookie-integrations/class-site-kit-analytics-cookie-integration.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'AMP_Base_Sanitizer' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/cookie-integrations/class-amp-block-on-consent-sanitizer.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Hooks\\Abstract_Hook' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/hooks/class-wordpress-action-hook.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Contracts\\Integration' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/class-plugin-customizer.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Customizer\\Abstract_Customizer_Control' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/customizer/class-media-customizer-control.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Shortcodes\\Base_Shortcode' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/shortcodes/class-base-context-shortcode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Cookie_Notice\\Cookie_Notice_AMP_Markup' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/cookie-notice/class-cookie-notice-amp-story-markup.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Contracts\\Integration' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/class-plugin-appearance-settings.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Cookie_Notice\\Cookie_Notice_Form_Markup' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/cookie-notice/class-cookie-notice-form-amp-markup.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Felix_Arntz\\WP_GDPR_Cookie_Notice\\Contracts\\Enum' not found in wp-content/plugins/wp-gdpr-cookie-notice/src/contracts/interface-labelled-enum.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/customize.php?autofocus[panel]=wp_gdpr_cookie_notice_settings
    • > Security (warning) in unknown
    /?customize_changeset_uuid=9a473e35-87f7-4988-bda5-bbbc191e7310&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.

Optimizations

Plugin configuration 96% 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
7 plugin tags: cookie consent, cookie notice, gdpr, amp, granular cookie control...

wp-gdpr-cookie-notice/wp-gdpr-cookie-notice.php 92% from 13 tests

The entry point to "WP GDPR Cookie Notice" version 1.0.0-rc.2... is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1.0.0-rc.2...")

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
Good job! No executable or dangerous file extensions detected4,327 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP1171,3695,4404,327

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.59
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces12
Interfaces26
Traits4
Classes86
▷ Abstract classes33.49%
▷ Concrete classes8396.51%
▷ Final classes00.00%
Methods411
▷ Static methods61.46%
▷ Public methods30473.97%
▷ Protected methods10525.55%
▷ Private methods20.49%
Functions29
▷ Named functions26.90%
▷ Anonymous functions2793.10%
Constants90
▷ Global constants00.00%
▷ Class constants90100.00%
▷ Public constants90100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin