10% wp-youtube-embed

Code Review | WP YouTube Embed

WordPress plugin WP YouTube Embed scored10%from 54 tests.

About plugin

  • Plugin page: wp-youtube-embed
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Nov 3, 2018
  • Latest release: Jan 31, 2021
  • Number of updates: 9
  • Update frequency: every 91.6 days
  • Top authors: nakunakifi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,636 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-youtube-embed/shortcodes/shortcode-init.php+27
    include_once(pro/shortcode-search.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.29ms] Passed 4 tests

A check of server-side resources used by WP YouTube Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.54 ▼37.48
Dashboard /wp-admin2.05 ▼1.2510.29 ▼41.64
Posts /wp-admin/edit.php2.05 ▼1.316.92 ▼41.24
Add New Post /wp-admin/post-new.php2.05 ▼3.846.83 ▼88.79
Media Library /wp-admin/upload.php2.05 ▼1.186.21 ▼29.54
Shortcode Examples /wp-admin/admin.php?page=cws_sc2.057.08
Settings /wp-admin/admin.php?page=cws_ytp2.055.21
Getting Started /wp-admin/admin.php?page=cws_gs2.056.39

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 151 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
cws_ytp_installed
cws_ytp_defaults
can_compress_scripts
theysaidso_admin_options
db_upgraded
cws_ytp_slider
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP YouTube Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲19517.67 ▲3.1195.90 ▲93.8946.79 ▲0.76
Dashboard /wp-admin2,230 ▲535.63 ▲0.0585.66 ▼9.7340.31 ▼5.91
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0535.16 ▼2.1633.51 ▼5.06
Add New Post /wp-admin/post-new.php1,555 ▲2923.53 ▲0.24681.23 ▼23.2458.03 ▲1.89
Media Library /wp-admin/upload.php1,435 ▲354.11 ▼0.06110.55 ▼0.4946.75 ▼0.80
Shortcode Examples /wp-admin/admin.php?page=cws_sc1,6352.0126.7452.63
Settings /wp-admin/admin.php?page=cws_ytp9812.0124.7535.21
Getting Started /wp-admin/admin.php?page=cws_gs9632.0026.2933.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wp-youtube-embed/shortcodes/shortcode-init.php+27
    include_once(pro/shortcode-search.php): failed to open stream: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cws_gs
    • > Warning in wp-content/plugins/wp-youtube-embed/shortcodes/shortcode-init.php+27
    include_once(pro/shortcode-search.php): failed to open stream: No such file or directory
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cws_gs
    • > Warning in wp-content/plugins/wp-youtube-embed/shortcodes/shortcode-init.php+27
    include_once(): Failed opening 'pro/shortcode-search.php' for inclusion (include_path='.:/usr/share/php')
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cws_gs
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cws_gs
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cws_ytp
    • > Notice in wp-content/plugins/wp-youtube-embed/admin/class-cws-youtube-pro-admin.php+1039
    Trying to access array offset on value of type bool

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-youtube-embed/public/partials/cws-google-picasa-pro-public-display.php
    • > /wp-content/plugins/wp-youtube-embed/admin/partials/cws-google-picasa-pro-admin-display.php
  • 123× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Client.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/Resource.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/AdSense.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/Admin.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/Dfareporting.php:32
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/Cache/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Cache/File.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/Datastore.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/Drive.php:32
    • > PHP Fatal error
      require_once(): Failed opening required 'Google/IO/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/IO/Curl.php on line 24
    • > PHP Warning
      include_once(pro/shortcode-search.php): failed to open stream: No such file or directory in wp-content/plugins/wp-youtube-embed/shortcodes/shortcode-init.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/wp-youtube-embed/includes/api-libs/Google/Service/Urlshortener.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cws_gs
    • > Network (severe)
    wp-content/plugins/wp-youtube-embed/admin/js/cws-youtube-pro-admin.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

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
6 plugin tags: gallery, video, playlist, channel, embed...

wp-youtube-embed/cws_youtube_pro.php 85% from 13 tests

"WP YouTube Embed" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-youtube-embed.php" instead of "cws_youtube_pro.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
Success! There were no dangerous files found in this plugin123,146 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
PHP12020,79826,615121,508
JavaScript54828741,078
CSS2158181560

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity216.00
Average method complexity1.04
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2,300
▷ Abstract classes50.22%
▷ Concrete classes2,29599.78%
▷ Final classes00.00%
Methods17,940
▷ Static methods140.08%
▷ Public methods17,89199.73%
▷ Protected methods110.06%
▷ Private methods380.21%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants190
▷ Global constants31.58%
▷ Class constants18798.42%
▷ Public constants187100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.15MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png92.25KB23.25KB▼ 74.79%
assets/banner-772x250.png29.45KB28.80KB▼ 2.21%
assets/icon-256x256.png21.73KB20.98KB▼ 3.45%
assets/icon-128x128.png6.98KB6.79KB▼ 2.69%