77% eu-cookie-law-notification

Code Review | EU Cookie Law Notification By Junnie

WordPress plugin EU Cookie Law Notification By Junnie scored77%from 54 tests.

About plugin

  • Plugin page: eu-cookie-law-not...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 14
  • Update frequency: every 0.5 days
  • Top authors: mad3000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,625 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.00MB] [CPU: ▼4.77ms] Passed 4 tests

Analyzing server-side resources used by EU Cookie Law Notification By Junnie
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.22 ▲4.91
Dashboard /wp-admin3.32 ▼0.0350.54 ▼8.67
Posts /wp-admin/edit.php3.37 ▲0.0247.05 ▲1.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.41 ▼11.36
Media Library /wp-admin/upload.php3.24 ▲0.0134.89 ▼0.33
Cookie Notification Setting /wp-admin/options-general.php?page=cookie-notification-jc-setting3.2633.30

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
cookie_notification_jc_options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by EU Cookie Law Notification By Junnie
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.58 ▼0.969.84 ▲8.3445.73 ▲5.90
Dashboard /wp-admin2,197 ▲165.61 ▼0.0795.53 ▼3.1142.91 ▼2.03
Posts /wp-admin/edit.php2,104 ▲72.17 ▲0.2234.25 ▼4.2331.56 ▼2.93
Add New Post /wp-admin/post-new.php6,247 ▲4,71922.34 ▼0.97950.33 ▲266.8835.51 ▼19.29
Media Library /wp-admin/upload.php1,402 ▲24.18 ▼0.0894.32 ▼6.4643.50 ▼1.13
Cookie Notification Setting /wp-admin/options-general.php?page=cookie-notification-jc-setting9881.9727.8031.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/eu-cookie-law-notification/include/include_notification_top.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: accept_text in wp-content/plugins/eu-cookie-law-notification/include/include_notification_bottom.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/eu-cookie-law-notification/eu-cookie-law-notification-by-junnie.php:25
    • > PHP Notice
      Undefined variable: position in wp-content/plugins/eu-cookie-law-notification/include/include_notification.php on line 1
    • > PHP Notice
      Undefined variable: accept_text in wp-content/plugins/eu-cookie-law-notification/include/include_notification.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_page_link() in wp-content/plugins/eu-cookie-law-notification/include/include_notification_bottom.php:6
    • > PHP Notice
      Undefined variable: notification_text in wp-content/plugins/eu-cookie-law-notification/include/include_notification_bottom.php on line 3
    • > PHP Notice
      Undefined variable: intro_text in wp-content/plugins/eu-cookie-law-notification/include/include_notification_top.php on line 2
    • > PHP Notice
      Undefined variable: notification_width in wp-content/plugins/eu-cookie-law-notification/include/include_notification_bottom.php on line 2
    • > PHP Notice
      Undefined variable: background_opacity in wp-content/plugins/eu-cookie-law-notification/include/include_notification_bottom.php on line 1
    • > PHP Notice
      Undefined variable: notification_width in wp-content/plugins/eu-cookie-law-notification/include/include_notification.php on line 2

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
  • Contributors: No valid plugin tags found
  • Donate link: Invalid URI ("")
The official readme.txt might help

eu-cookie-law-notification/eu-cookie-law-notification-by-junnie.php 85% from 13 tests

The primary PHP file in "EU Cookie Law Notification By Junnie" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 352 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("eu-cookie-law-notification.php" instead of "eu-cookie-law-notification-by-junnie.php")

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
There were no executable files found in this plugin373 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP57749268
CSS211277
JavaScript23128

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
No PNG files were detected