78% eu-cookie-bar

Code Review | EU COOKIE BAR

WordPress plugin EU COOKIE BAR scored78%from 54 tests.

About plugin

  • Plugin page: eu-cookie-bar
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: Oct 18, 2019
  • Number of updates: 16
  • Update frequency: every 20.7 days
  • Top authors: emilswiniarski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.08ms] Passed 4 tests

Server-side resources used by EU COOKIE BAR
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.46 ▼4.42
Dashboard /wp-admin3.32 ▼0.0248.93 ▼17.19
Posts /wp-admin/edit.php3.37 ▲0.0250.90 ▼0.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.76 ▼19.64
Media Library /wp-admin/upload.php3.25 ▲0.0234.30 ▼3.08

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by EU COOKIE BAR
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.30 ▼1.342.83 ▲0.9236.79 ▼11.14
Dashboard /wp-admin2,230 ▲275.86 ▲0.01101.59 ▼15.6337.53 ▼6.97
Posts /wp-admin/edit.php2,109 ▲92.01 ▼0.0041.21 ▲4.6234.43 ▼1.43
Add New Post /wp-admin/post-new.php1,387 ▼14416.71 ▼6.66555.28 ▼139.9166.96 ▲13.97
Media Library /wp-admin/upload.php1,409 ▲124.22 ▼0.07100.37 ▼8.3446.53 ▼0.94
EU Cookie /wp-admin/eu-cookie.php260.440.1014.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/eu-cookie-bar/templates/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/eu-cookie-bar/templates/message-box.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/eu-cookie.php
    • > Network (severe)
    wp-admin/eu-cookie.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: cookie, cookie info, eu cookie bar

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

The main file in "EU COOKIE BAR" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("eu-cookie-bar.php" instead of "eu-cookie.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected263 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3166123
CSS114088
JavaScript212048
Markdown1104

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.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 were not PNG files found in your plugin