83% iubenda-cookie-law-solution

Code Review | iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more

WordPress plugin iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more scored83%from 54 tests.

About plugin

  • Plugin page: iubenda-cookie-la...
  • Plugin version: 3.7.9
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 5, 2015
  • Latest release: Nov 30, 2023
  • Number of updates: 363
  • Update frequency: every 8.5 days
  • Top authors: iubenda (63.64%)Facens (20.66%)dfactory (16.25%)

Code review

54 tests

User reviews

295 reviews

Install metrics

100,000+ active /3,116,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.35MB] [CPU: ▲6.46ms] Passed 4 tests

Server-side resources used by iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.84 ▲1.3849.35 ▲6.90
Dashboard /wp-admin4.64 ▲1.3453.95 ▲2.53
Posts /wp-admin/edit.php4.75 ▲1.4055.03 ▲9.76
Add New Post /wp-admin/post-new.php7.22 ▲1.3495.67 ▲6.63
Media Library /wp-admin/upload.php4.56 ▲1.3345.72 ▲13.88

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 127 new files
Database: no new tables, 11 new options
New WordPress options
iubenda_activated_products
iubenda_radar_api_configuration
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
iubenda_cookie_law_version
widget_recent-comments
can_compress_scripts
widget_iubenda_legal_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7514.35 ▼0.301.71 ▲0.0644.21 ▲1.09
Dashboard /wp-admin2,245 ▲655.60 ▼0.0396.05 ▼3.6142.64 ▼0.36
Posts /wp-admin/edit.php2,151 ▲512.01 ▲0.0737.96 ▲0.2530.94 ▼3.22
Add New Post /wp-admin/post-new.php6,214 ▲4,68819.06 ▼4.03921.48 ▲217.7152.59 ▼0.89
Media Library /wp-admin/upload.php1,448 ▲454.16 ▼0.0199.95 ▲2.5340.59 ▼1.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • iubenda_global_options
    • widget_iubenda_legal_widget
    • iubenda_cookie_law_version
    • can_compress_scripts
    • iubenda_activated_products
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/iubenda-cookie-law-solution/views/partials/auto-detect-forms.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

iubenda-cookie-law-solution/iubenda_cookie_solution.php 77% from 13 tests

"iubenda | All-in-one Compliance for GDPR / CCPA Cookie Consent + more" version 3.7.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 327 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("iubenda-cookie-law-solution.php" instead of "iubenda_cookie_solution.php")

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
No dangerous file extensions were detected18,805 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP662,1503,63010,430
PO File61,4162,1424,728
CSS342482,344
JavaScript51801131,124
Markdown1500133
SVG300030
JSON10016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity54.90
▷ Minimum class complexity2.00
▷ Maximum class complexity258.00
Average method complexity5.21
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes29
▷ Abstract classes13.45%
▷ Concrete classes2896.55%
▷ Final classes00.00%
Methods372
▷ Static methods71.88%
▷ Public methods28376.08%
▷ Protected methods266.99%
▷ Private methods6316.94%
Functions19
▷ Named functions1578.95%
▷ Anonymous functions421.05%
Constants37
▷ Global constants2670.27%
▷ Class constants1129.73%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin