90% hayona-cookies

Code Review | Hayona Cookie Consent

WordPress plugin Hayona Cookie Consent scored90%from 54 tests.

About plugin

  • Plugin page: hayona-cookies
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6
  • WordPress version: 6.3.1
  • First release: Jan 4, 2016
  • Latest release: Sep 15, 2016
  • Number of updates: 28
  • Update frequency: every 9.5 days
  • Top authors: lkorteweg@hayona.nl (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /3,065 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.87ms] Passed 4 tests

Server-side resources used by Hayona Cookie Consent
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.91 ▼2.27
Dashboard /wp-admin3.44 ▲0.1342.43 ▼9.60
Posts /wp-admin/edit.php3.55 ▲0.1940.27 ▼5.39
Add New Post /wp-admin/post-new.php6.02 ▲0.1382.88 ▼6.21
Media Library /wp-admin/upload.php3.36 ▲0.1337.05 ▲2.76
Cookie Consent /wp-admin/options-general.php?page=hayona-cookies3.3331.16

Server storage [IO: ▲0.44MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/hayona-cookies/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/hayona-cookies/assets/icon-128\303\227128.png"
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Hayona Cookie Consent
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.26 ▼0.021.76 ▼0.1144.47 ▼0.61
Dashboard /wp-admin2,216 ▲395.58 ▼0.1085.45 ▼8.1441.29 ▲4.83
Posts /wp-admin/edit.php2,130 ▲272.01 ▲0.0338.84 ▲2.7931.45 ▼0.16
Add New Post /wp-admin/post-new.php1,545 ▲1023.02 ▲4.83598.34 ▼52.7859.71 ▼13.71
Media Library /wp-admin/upload.php1,421 ▲184.22 ▲0.0299.95 ▼0.0743.40 ▼1.23
Cookie Consent /wp-admin/options-general.php?page=hayona-cookies8722.1323.5230.99

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive 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 Passed 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
5 plugin tags: cookie banner, google tag manager, eu cookie law, cookie consent, privacy settings

hayona-cookies/hayona-cookies.php Passed 13 tests

"Hayona Cookie Consent" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
85 characters long description:
A straightforward plugin to comply with the EU cookie law, including implied consent.

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,318 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP194117506
Sass2997366
JavaScript26999218
PO File185145217
Markdown1609
CSS2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods2796.43%
▷ Protected methods00.00%
▷ Private methods13.57%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png35.99KB36.44KB0.00%
assets/banner-772x250.png29.32KB9.02KB▼ 69.23%
assets/screenshot-4.png39.08KB40.46KB0.00%
assets/screenshot-2.png27.28KB28.27KB0.00%
assets/screenshot-1.png24.10KB26.13KB0.00%