84% yt-no-cookie-embed

Code Review | Youtube No-Cookie Embed

WordPress plugin Youtube No-Cookie Embed scored84%from 54 tests.

About plugin

  • Plugin page: yt-no-cookie-embed
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.0.3
  • WordPress version: 6.3.1
  • First release: Nov 9, 2018
  • Latest release: Jan 17, 2019
  • Number of updates: 8
  • Update frequency: every 80.4 days
  • Top authors: foack (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /799 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.29ms] Passed 4 tests

This is a short check of server-side resources used by Youtube No-Cookie Embed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0833.87 ▼7.18
Dashboard /wp-admin3.38 ▲0.0346.20 ▼15.79
Posts /wp-admin/edit.php3.49 ▲0.1345.09 ▼1.34
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.71 ▲6.74
Media Library /wp-admin/upload.php3.30 ▲0.0731.84 ▼0.84

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Youtube No-Cookie Embed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.134.61 ▲2.9239.73 ▼4.53
Dashboard /wp-admin2,210 ▲215.90 ▲0.89100.41 ▼23.5139.87 ▼7.59
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0239.55 ▲2.6734.69 ▼2.52
Add New Post /wp-admin/post-new.php1,522 ▲222.71 ▼0.62599.30 ▼74.2863.35 ▲10.35
Media Library /wp-admin/upload.php1,392 ▲74.33 ▲0.13103.94 ▲5.5740.75 ▼3.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/yt-no-cookie-embed/public/partials/yt-no-cookie-embed-public-display.php
    • > /wp-content/plugins/yt-no-cookie-embed/admin/partials/yt-no-cookie-embed-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === yt-no-cookie-embed === )
You can take inspiration from this readme.txt

yt-no-cookie-embed/yt-no-cookie-embed.php Passed 13 tests

The main file in "Youtube No-Cookie Embed" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
96 characters long description:
This plugin extends the Fusion Builder plugin with a "Youtube (No-Cookie)" page builder element.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin324 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12143568318
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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