10% customizable-gdpr-cookie-consent-banner

Code Review | Customizable GDPR Cookie Consent Banner

WordPress plugin Customizable GDPR Cookie Consent Banner scored10%from 54 tests.

About plugin

  • Plugin page: customizable-gdpr...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Sep 14, 2022
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: appifycommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/customizable-gdpr-cookie-consent-banner/rcc_wp.php+176
    Undefined property: stdClass::$options

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.10ms] Passed 4 tests

A check of server-side resources used by Customizable GDPR Cookie Consent Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.07 ▲4.76
Dashboard /wp-admin3.35 ▲0.0548.38 ▼6.01
Posts /wp-admin/edit.php3.46 ▲0.1156.64 ▲2.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0597.20 ▼12.22
Media Library /wp-admin/upload.php3.27 ▲0.0439.82 ▲3.77

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_ac_rcc
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Customizable GDPR Cookie Consent Banner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.33 ▼1.262.15 ▲0.4343.29 ▼0.18
Dashboard /wp-admin2,222 ▲374.87 ▼0.94108.02 ▲6.1442.60 ▼2.04
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0440.24 ▲3.1034.88 ▼1.43
Add New Post /wp-admin/post-new.php1,527 ▼317.53 ▼0.60674.89 ▲45.0560.73 ▲4.10
Media Library /wp-admin/upload.php1,404 ▲194.23 ▲0.0298.07 ▼13.0345.54 ▲0.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/customizable-gdpr-cookie-consent-banner/rcc_wp.php+176
    Undefined property: stdClass::$options
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/customizable-gdpr-cookie-consent-banner/includes/rcc-controller.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customizable-gdpr-cookie-consent-banner/includes/rcc-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/customizable-gdpr-cookie-consent-banner/rcc_wp.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: cookies, banner, cookie consent, cookie, customizable

customizable-gdpr-cookie-consent-banner/rcc_wp.php 92% from 13 tests

The primary PHP file in "Customizable GDPR Cookie Consent Banner" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("customizable-gdpr-cookie-consent-banner.php" instead of "rcc_wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected323 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37054323

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin