66% embed-youtube-videos

Code Review | Embed Youtube Videos

WordPress plugin Embed Youtube Videos scored 66% from 54 tests.

About plugin

  • Plugin page: embed-youtube-videos
  • Plugin version: 4.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 12, 2022
  • Latest release: Jun 28, 2023
  • Number of updates: 24
  • Update frequency: every 18.4 days
  • Top authors: walexconcepts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 755 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.52ms] Passed 4 tests

This is a short check of server-side resources used by Embed Youtube Videos
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.97 ▼1.92
Dashboard /wp-admin3.32 ▲0.0141.73 ▼9.60
Posts /wp-admin/edit.php3.37 ▲0.0143.64 ▼6.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.95 ▼12.40
Media Library /wp-admin/upload.php3.24 ▲0.0136.32 ▼0.11
Help /wp-admin/admin.php?page=help_woocommerce_embed_youtube_videos3.2330.11
Video Manager /wp-admin/admin.php?page=videos_manager_woocommerce_embed_youtube_videos3.2824.74

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wc_woocommerce_embed_youtube_videos
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Embed Youtube Videos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲6413.27 ▼1.464.78 ▲2.9639.52 ▼2.88
Dashboard /wp-admin2,234 ▲254.91 ▼1.0196.47 ▼1.7571.87 ▲36.05
Posts /wp-admin/edit.php2,120 ▲312.01 ▲0.0236.39 ▲0.7934.11 ▼4.47
Add New Post /wp-admin/post-new.php1,430 ▼9817.98 ▼0.37699.54 ▲25.5755.77 ▼6.05
Media Library /wp-admin/upload.php1,416 ▲314.18 ▲0.0198.79 ▼0.8548.61 ▼1.28
Help /wp-admin/admin.php?page=help_woocommerce_embed_youtube_videos8722.0223.4225.94
Video Manager /wp-admin/admin.php?page=videos_manager_woocommerce_embed_youtube_videos8492.0223.4320.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=videos_manager_woocommerce_embed_youtube_videos
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/embed-youtube-videos/admin/woocommerce_embed_youtube_videos_help.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: detail in wp-content/plugins/embed-youtube-videos/item_detail.php on line 2
    • > PHP Notice
      Undefined variable: detail in wp-content/plugins/embed-youtube-videos/item_tab.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/embed-youtube-videos/admin/woocommerce_embed_youtube_videos_form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/embed-youtube-videos/index.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=videos_manager_woocommerce_embed_youtube_videos
    • > Network (severe)
    wp-content/plugins/embed-youtube-videos/admin/css/woocommerce_embed_youtube_videos.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: You can look at the official readme.txt

embed-youtube-videos/index.php 92% from 13 tests

The entry point to "Embed Youtube Videos" version 4.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("embed-youtube-videos.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected703 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP65712401
CSS2383295
SQL1307

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
adminicon.png12.10KB0.99KB▼ 91.80%