10% eu-cookie-consent

Code Review | EU Cookie Consent

WordPress plugin EU Cookie Consent scored10%from 54 tests.

About plugin

  • Plugin page: eu-cookie-consent
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Jun 16, 2022
  • Number of updates: 11
  • Update frequency: every 215.9 days
  • Top authors: RSimpson (72.73%)rsdotscot (36.36%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /8,775 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/eu-cookie-consent/eu-cookie-consent.php+39
    Only variables should be passed by reference

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.48ms] Passed 4 tests

This is a short check of server-side resources used by EU Cookie Consent
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.67 ▼37.37
Dashboard /wp-admin2.08 ▼1.227.21 ▼38.37
Posts /wp-admin/edit.php2.08 ▼1.285.67 ▼44.02
Add New Post /wp-admin/post-new.php2.08 ▼3.815.37 ▼98.14
Media Library /wp-admin/upload.php2.08 ▼1.155.57 ▼30.13

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
rs_eucc_settings
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for EU Cookie Consent
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.34 ▼1.241.72 ▲0.0244.00 ▼0.69
Dashboard /wp-admin2,218 ▲295.80 ▲0.87111.67 ▼12.7041.74 ▼5.24
Posts /wp-admin/edit.php2,101 ▲121.96 ▼0.0833.36 ▼6.6833.47 ▼0.98
Add New Post /wp-admin/post-new.php1,543 ▲2423.15 ▲0.05661.23 ▼11.2764.92 ▲4.18
Media Library /wp-admin/upload.php1,400 ▲94.21 ▼0.02101.20 ▲3.3843.96 ▼3.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/eu-cookie-consent/eu-cookie-consent.php+39
    Only variables should be passed by reference
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • rs_eucc_settings
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: cookie consent, cookies, eu, european union, europe...

eu-cookie-consent/eu-cookie-consent.php 92% from 13 tests

The primary PHP file in "EU Cookie Consent" version 0.1.4 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 265 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
There were no executable files found in this plugin368 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP93222213
JavaScript100147
CSS7008

PHP code Passed 2 tests

Analyzing 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.39
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
eucc/cookieconsent2/gfx/logo.png3.01KB2.25KB▼ 25.30%