78% lgpd-compliant-cookie-banner

Code Review | illow - Cookies Consent

WordPress plugin illow - Cookies Consent scored 78% from 54 tests.

About plugin

  • Plugin page: lgpd-compliant-co...
  • Plugin version: 0.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2022
  • Latest release: May 19, 2023
  • Number of updates: 47
  • Update frequency: every 9.2 days
  • Top authors: wibson (100%)

Code review

54 tests

User reviews

114 reviews

Install metrics

1,000+ active / 3,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.14ms] Passed 4 tests

A check of server-side resources used by illow - Cookies Consent
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.20 ▲0.09
Dashboard /wp-admin3.32 ▲0.0148.01 ▲1.63
Posts /wp-admin/edit.php3.37 ▲0.0146.94 ▼1.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.99 ▼9.03
Media Library /wp-admin/upload.php3.24 ▲0.0136.22 ▲2.06
Configurações /wp-admin/admin.php?page=wibson-menu3.2631.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
wibson_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for illow - Cookies Consent
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10614.73 ▲0.062.10 ▲0.4346.09 ▼2.82
Dashboard /wp-admin2,222 ▲375.80 ▼0.1097.82 ▼0.0237.98 ▼5.71
Posts /wp-admin/edit.php2,105 ▲162.00 ▼0.0135.10 ▲0.3732.10 ▼5.85
Add New Post /wp-admin/post-new.php1,546 ▲1323.19 ▲0.01640.92 ▼24.7052.34 ▼1.27
Media Library /wp-admin/upload.php1,407 ▲164.19 ▲0.03104.14 ▲4.8246.99 ▼2.64
Configurações /wp-admin/admin.php?page=wibson-menu8752.0225.9631.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lgpd-compliant-cookie-banner/wibson-plugin.php
    • > /wp-content/plugins/lgpd-compliant-cookie-banner/admin/partials/success-admin-notice.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lgpd-compliant-cookie-banner/admin/partials/wibson-plugin-admin-display.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

lgpd-compliant-cookie-banner/wibson-plugin.php 85% from 13 tests

This is the main PHP file of "illow - Cookies Consent" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lgpd-compliant-cookie-banner.php" instead of "wibson-plugin.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,055 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File11165176762
PHP77518293

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity4.00
▷ Maximum class complexity6.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods1768.00%
▷ Protected methods00.00%
▷ Private methods832.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/images/copy_code_illow.png49.18KB17.06KB▼ 65.30%
admin/partials/images/sign-up_illow.png27.36KB9.41KB▼ 65.60%