90% eu-cookies-bar

Code Review | EU Cookies Bar for WordPress

WordPress plugin EU Cookies Bar for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: eu-cookies-bar
  • Plugin version: 1.0.13
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 27, 2018
  • Latest release: Oct 26, 2023
  • Number of updates: 48
  • Update frequency: every 40.6 days
  • Top authors: kimvt1991 (70.83%)mrt3vn (25%)thanhtd (8.33%)

Code review

54 tests

User reviews

23 reviews

Install metrics

8,000+ active /58,458 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.51MB] [CPU: ▲4.44ms] Passed 4 tests

This is a short check of server-side resources used by EU Cookies Bar for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5244.54 ▲7.45
Dashboard /wp-admin3.83 ▲0.5256.09 ▲5.55
Posts /wp-admin/edit.php3.91 ▲0.5652.98 ▲5.34
Add New Post /wp-admin/post-new.php6.38 ▲0.4989.54 ▼0.58
Media Library /wp-admin/upload.php3.72 ▲0.4941.19 ▲10.07
Extensions /wp-admin/admin.php?page=eu-cookies-bar-extensions3.91491.64
Cookies bar /wp-admin/admin.php?page=eu-cookies-bar3.7946.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
eu-cookies-bar_start_use
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by EU Cookies Bar for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,348 ▲58713.90 ▼0.4617.00 ▲15.3844.54 ▲4.35
Dashboard /wp-admin2,314 ▲1375.56 ▼0.1184.42 ▼1.1547.53 ▲7.67
Posts /wp-admin/edit.php2,178 ▲782.17 ▲0.1934.94 ▼3.0234.56 ▼3.04
Add New Post /wp-admin/post-new.php1,587 ▲4923.05 ▼0.09669.71 ▼52.0250.63 ▼1.06
Media Library /wp-admin/upload.php1,474 ▲834.20 ▲0.03110.40 ▲8.8249.32 ▲5.46
Extensions /wp-admin/admin.php?page=eu-cookies-bar-extensions1,7842.1529.3270.97
Cookies bar /wp-admin/admin.php?page=eu-cookies-bar3,69910.53231.97164.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • eu-cookies-bar_start_use
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: cookies gdpr, cookie popup, cookie consent, for wordpress, cookie policy generator...

eu-cookies-bar/eu-cookies-bar.php Passed 13 tests

The primary PHP file in "EU Cookies Bar for WordPress" version 1.0.13 is used by WordPress to initiate all plugin functionality
114 characters long description:
Simple cookie bar to make your website GDPR(General Data Protection Regulation) compliant(EU Cookie Law) and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,483 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP82001272,473
CSS6164376873
SVG203629
JavaScript43415508

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity50.57
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity8.23
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods12.08%
▷ Public methods4491.67%
▷ Protected methods24.17%
▷ Private methods24.17%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin