89% mycookie-gdpr-compliance

Code Review | MyCookie

WordPress plugin MyCookie scored89%from 54 tests.

About plugin

  • Plugin page: mycookie-gdpr-com...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2020
  • Latest release: Nov 23, 2022
  • Number of updates: 15
  • Update frequency: every 55.9 days
  • Top authors: dawidglobalsense (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,060 total downloads

Benchmarks

Plugin footprint 83% 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.04MB] [CPU: ▼3.77ms] Passed 4 tests

A check of server-side resources used by MyCookie
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.83 ▲4.57
Dashboard /wp-admin3.35 ▲0.0159.76 ▼4.72
Posts /wp-admin/edit.php3.47 ▲0.1150.67 ▲1.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.28 ▼7.74
Media Library /wp-admin/upload.php3.28 ▲0.0533.91 ▼3.80

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

MyCookie: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,990 ▲24413.30 ▼0.993.05 ▲1.1143.89 ▼1.48
Dashboard /wp-admin2,235 ▲475.77 ▲0.88115.55 ▲7.5744.70 ▲0.91
Posts /wp-admin/edit.php2,120 ▲282.06 ▲0.0838.44 ▲0.5136.99 ▲0.36
Add New Post /wp-admin/post-new.php1,567 ▲4818.43 ▼4.88663.41 ▲15.1167.57 ▲8.11
Media Library /wp-admin/upload.php1,423 ▲354.17 ▼0.06107.50 ▲1.5342.60 ▼3.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: gdpr, cookie consent, cookies, wp

mycookie-gdpr-compliance/my-cookie.php 85% from 13 tests

This is the main PHP file of "MyCookie" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("mycookie-gdpr-compliance.php" instead of "my-cookie.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,159 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP17219771
PO File31890384
CSS2002
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity104.00
▷ Minimum class complexity104.00
▷ Maximum class complexity104.00
Average method complexity6.15
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected