84% kokku-cookie-banner

Code Review | Kokku Cookie Banner

WordPress plugin Kokku Cookie Banner scored84%from 54 tests.

About plugin

  • Plugin page: kokku-cookie-banner
  • Plugin version: 1.8.8
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 6.3.1
  • First release: Feb 8, 2022
  • Latest release: Apr 1, 2022
  • Number of updates: 11
  • Update frequency: every 4.7 days
  • Top authors: kokkultd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.37ms] Passed 4 tests

Analyzing server-side resources used by Kokku Cookie Banner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.10 ▼10.36
Dashboard /wp-admin3.33 ▲0.0345.78 ▼1.37
Posts /wp-admin/edit.php3.38 ▲0.0244.98 ▼0.37
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.03 ▼1.38
Media Library /wp-admin/upload.php3.25 ▲0.0237.14 ▲3.17

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
kokku_cookie_banner_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Kokku Cookie Banner
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲23213.77 ▼0.976.32 ▲4.4239.19 ▼2.00
Dashboard /wp-admin2,244 ▲555.08 ▲0.11106.96 ▼1.3739.17 ▼6.11
Posts /wp-admin/edit.php2,129 ▲402.29 ▲0.2939.51 ▲2.1533.68 ▼1.40
Add New Post /wp-admin/post-new.php1,541 ▲2123.11 ▼0.05590.43 ▼91.3933.23 ▼20.91
Media Library /wp-admin/upload.php1,417 ▲294.53 ▲0.31100.29 ▲1.0842.80 ▲0.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kokku-cookie-banner/templates/cookie-banner.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kokku-cookie-banner/includes/pages.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kokku-cookie-banner/includes/general.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kokku-cookie-banner/includes/cookie-banner.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kokku-cookie-banner/includes/menus.php:31

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, but this is not an exhaustive test

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
3 plugin tags: gdpr, cookie banner, cookie consent

kokku-cookie-banner/kokku-cookie-banner.php 92% from 13 tests

The primary PHP file in "Kokku Cookie Banner" version 1.8.8 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin1,047 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP9116387709
JavaScript63133175
Sass1190127
JSON10028
XML1007
CSS1101

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin