100% yo-cookie

Code Review | Cookie Panel, GDPR - By Yo Cookie Team

WordPress plugin Cookie Panel, GDPR - By Yo Cookie Team scored 100% from 54 tests.

About plugin

  • Plugin page: yo-cookie
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9
  • WordPress version: 5.8.1
  • First release: Jun 22, 2018
  • Latest release: Aug 7, 2018
  • Number of updates: 6
  • Update frequency: every 9.0 days
  • Top authors: sgmediabox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 735 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼144.50ms] Passed 4 tests

Server-side resources used by Cookie Panel, GDPR - By Yo Cookie Team
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.63 ▲12.83
Dashboard /wp-admin3.07 ▲0.0245.92 ▼1.41
Posts /wp-admin/edit.php3.12 ▲0.0249.41 ▲0.70
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.59 ▼581.56
Media Library /wp-admin/upload.php3.02 ▲0.0137.25 ▲4.26

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Cookie Panel, GDPR - By Yo Cookie Team: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.74 ▼0.068.32 ▼6.7248.77 ▼4.13
Dashboard /wp-admin2,999 ▲685.92 ▼0.07146.04 ▼9.87115.92 ▼8.39
Posts /wp-admin/edit.php2,768 ▲292.70 ▼0.1270.96 ▼2.5886.21 ▼6.03
Add New Post /wp-admin/post-new.php1,545 ▼13818.72 ▼0.00388.75 ▲25.16113.83 ▼0.84
Media Library /wp-admin/upload.php1,836 ▲295.00 ▼0.01155.63 ▼0.97132.05 ▲2.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (Yo Cookie - cookie panel) image missing
The official readme.txt might help

yo-cookie/yo-cookie.php Passed 13 tests

Analyzing the main PHP file in "Cookie Panel, GDPR - By Yo Cookie Team" version 1.0.2
76 characters long description:
Yo Cookie - flexible plugins to show and manage cookie and privacy agreement

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 plugin4,147 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65073712,172
CSS3113171,086
PHP38530386
HTML1463259
JSON200103
Sass115086
Markdown212039
YAML11016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods315.00%
▷ Public methods1260.00%
▷ Protected methods00.00%
▷ Private methods840.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin