83% cookie-information-consent-solution

Code Review | Cookie Information - GDPR & ePrivacy Cookie Consent Solution

WordPress plugin Cookie Information - GDPR & ePrivacy Cookie Consent Solution scored 83% from 54 tests.

About plugin

  • Plugin page: cookie-informatio...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 5.8.1
  • First release: Nov 9, 2018
  • Latest release: Dec 18, 2020
  • Number of updates: 53
  • Update frequency: every 14.6 days
  • Top authors: cookieinformation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 8,737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Cookie Information - GDPR & ePrivacy Cookie Consent Solution
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.53 ▲4.34
Dashboard /wp-admin3.08 ▲0.0243.30 ▼8.71
Posts /wp-admin/edit.php3.13 ▲0.0244.20 ▼7.29
Add New Post /wp-admin/post-new.php5.43 ▲0.0097.83 ▼570.52
Media Library /wp-admin/upload.php3.02 ▲0.0237.76 ▲3.80
Settings /wp-admin/admin.php?page=cookie-information-settings2.9932.65
Cookie Information /wp-admin/admin.php?page=cookie-information2.9929.56

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
video-sdk-category
enable-popup
enable-video-sdk
enable-gcm
disable-logged-in-users
enable-tcf

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cookie Information - GDPR & ePrivacy Cookie Consent Solution
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,753 ▲15716.40 ▲0.9321.24 ▲12.1450.53 ▲2.03
Dashboard /wp-admin3,004 ▲735.92 ▼0.03152.29 ▲3.59121.08 ▲4.47
Posts /wp-admin/edit.php2,773 ▲342.70 ▲0.0079.70 ▲11.2199.75 ▲8.52
Add New Post /wp-admin/post-new.php1,705 ▲2218.72 ▲0.20385.35 ▲0.73118.79 ▼0.41
Media Library /wp-admin/upload.php1,841 ▲345.00 ▼0.01159.27 ▼6.07128.50 ▲0.94
Settings /wp-admin/admin.php?page=cookie-information-settings1,4392.2158.0293.33
Cookie Information /wp-admin/admin.php?page=cookie-information1,1102.0562.3989.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • video-sdk-category
    • disable-logged-in-users
    • enable-gcm
    • enable-tcf
    • enable-popup
    • enable-video-sdk

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cookie-information-consent-solution/cookie-information.php

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 ([https://cookieinformation.com/extensions/wordpress/screenshot1.JPG The plugin screen once it has been installed]), #2 ([https://cookieinformation.com/extensions/wordpress/screenshot2.JPG Example of a consent popup from Cookie Information]), #3 ([https://cookieinformation.com/extensions/wordpress/screenshot3.JPG Privacy Controls to updating the users consent])
The official readme.txt might help

cookie-information-consent-solution/cookie-information.php 85% from 13 tests

"Cookie Information - GDPR & ePrivacy Cookie Consent Solution" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cookie-information-consent-solution.php" instead of "cookie-information.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin492 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16238316
CSS161149
JavaScript17118
HTML1109

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/ci-logo.png17.29KB9.71KB▼ 43.81%