84% bandeau-cookie

Code Review | Bandeau Cookie : RGPD/GPDR Cookie Consent

WordPress plugin Bandeau Cookie : RGPD/GPDR Cookie Consent scored84%from 54 tests.

About plugin

  • Plugin page: bandeau-cookie
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2022
  • Latest release: Jan 5, 2023
  • Number of updates: 6
  • Update frequency: every 3.7 days
  • Top authors: alfatechno (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.67ms] Passed 4 tests

Analyzing server-side resources used by Bandeau Cookie : RGPD/GPDR Cookie Consent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.04 ▼5.58
Dashboard /wp-admin3.33 ▼0.0249.95 ▼17.07
Posts /wp-admin/edit.php3.38 ▲0.0249.13 ▼0.88
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.03 ▼7.13
Media Library /wp-admin/upload.php3.25 ▲0.0238.04 ▼0.68
Bandeau Cookie : RGPD/GPDR Cookie Consent /wp-admin/options-general.php?page=bandeau-cookie3.2230.40

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bandeau Cookie : RGPD/GPDR Cookie Consent
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.09 ▼0.431.85 ▼0.3143.38 ▲1.51
Dashboard /wp-admin2,202 ▲255.57 ▲0.0396.65 ▼5.0242.77 ▼1.31
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0037.54 ▲0.2233.84 ▼2.64
Add New Post /wp-admin/post-new.php1,531 ▲323.13 ▲0.33693.12 ▲26.9848.52 ▼1.85
Media Library /wp-admin/upload.php1,404 ▲134.28 ▲0.1197.24 ▼5.3846.71 ▼3.41
Bandeau Cookie : RGPD/GPDR Cookie Consent /wp-admin/options-general.php?page=bandeau-cookie8212.1726.0030.12

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bandeau-cookie/bandeau-cookie.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bandeau-cookie/inc/admin-bandeau-cookie.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: rgpd, bandeau cookie, bandeau cookies, cookie, gestion des consentements...

bandeau-cookie/bandeau-cookie.php 92% from 13 tests

This is the main PHP file of "Bandeau Cookie : RGPD/GPDR Cookie Consent" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin168 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22326141
PO File15527

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/logo_BC_v02_SA.png7.89KB2.87KB▼ 63.64%