84% eu-cookie-notification

Code Review | EU Cookie Law Notice/Banner

WordPress plugin EU Cookie Law Notice/Banner scored84%from 54 tests.

About plugin

  • Plugin page: eu-cookie-notific...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 16, 2016
  • Latest release: Jul 25, 2023
  • Number of updates: 32
  • Update frequency: every 76.2 days
  • Top authors: zotabox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by EU Cookie Law Notice/Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.56 ▼1.04
Dashboard /wp-admin3.35 ▲0.0549.10 ▲0.98
Posts /wp-admin/edit.php3.41 ▲0.0552.65 ▲1.93
Add New Post /wp-admin/post-new.php5.94 ▲0.0588.99 ▼19.09
Media Library /wp-admin/upload.php3.28 ▲0.0536.41 ▲1.62

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-posts
ztb_access_key
ztb_email
db_upgraded
access_key
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
ztb_domainid
ztb_status_message
...

Browser metrics Passed 4 tests

Checking browser requirements for EU Cookie Law Notice/Banner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.57 ▲0.221.86 ▲0.3039.61 ▲0.31
Dashboard /wp-admin2,199 ▲255.58 ▼0.0285.19 ▼14.3580.07 ▲38.54
Posts /wp-admin/edit.php2,122 ▲251.97 ▼0.0544.95 ▲8.3638.82 ▲1.58
Add New Post /wp-admin/post-new.php1,551 ▲2523.14 ▼0.22638.06 ▲5.5462.83 ▲11.85
Media Library /wp-admin/upload.php1,419 ▲164.24 ▲0.07103.74 ▼2.3466.71 ▲17.40

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 14 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • access_key
    • ztb_source
    • db_upgraded
    • ztb_status_message
    • ztb_status_disconnect
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 75% 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 everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eu-cookie-notification/eu-cookie-notification.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

eu-cookie-notification/eu-cookie-notification.php Passed 13 tests

"EU Cookie Law Notice/Banner" version 1.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
120 characters long description:
EU Cookie Notice shows cookie notification bar or box to inform users that your website uses cookie according to EU law.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin501 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS234273
PHP11915188
JavaScript14040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/check.png2.96KB0.37KB▼ 87.47%
assets/images/bg_body.png22.84KB9.83KB▼ 56.98%
assets/images/logo-zotabox.png5.45KB2.43KB▼ 55.35%
zotabox.png3.19KB0.44KB▼ 86.31%