84% yt-cookie-nonsense

Code Review | Cookie Nonsense for YT

WordPress plugin Cookie Nonsense for YT scored84%from 54 tests.

About plugin

  • Plugin page: yt-cookie-nonsense
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4
  • WordPress version: 6.3.1
  • First release: Jun 19, 2020
  • Latest release: Jul 3, 2020
  • Number of updates: 13
  • Update frequency: every 1.1 days
  • Top authors: dozyde (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /501 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.60ms] Passed 4 tests

Analyzing server-side resources used by Cookie Nonsense for YT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.58 ▼4.20
Dashboard /wp-admin3.33 ▲0.0245.58 ▼7.71
Posts /wp-admin/edit.php3.38 ▲0.0247.05 ▼0.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.56 ▼18.03
Media Library /wp-admin/upload.php3.25 ▲0.0232.62 ▼0.11

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Cookie Nonsense for YT
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.40 ▼0.011.96 ▲0.1042.06 ▲0.29
Dashboard /wp-admin2,203 ▲155.85 ▲0.9997.70 ▼22.9139.55 ▼3.56
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0140.99 ▼0.0636.25 ▲2.08
Add New Post /wp-admin/post-new.php1,535 ▲2122.99 ▲5.56633.56 ▼71.5857.05 ▼8.32
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.0996.23 ▼18.5741.11 ▼16.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • 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 | 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yt-cookie-nonsense/yt-cookie-nonsense.php:138

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: dsgvo, gdpr, wpbakery, datenschutz

yt-cookie-nonsense/yt-cookie-nonsense.php Passed 13 tests

"Cookie Nonsense for YT" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Embed Videos (Youtube or Vimeo) in WPBakery with GDPR requirements

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected246 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22778206
JavaScript10632
CSS1008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin