10% enhanced-youtube-shortcode

Code Review | Enhanced YouTube Shortcode

WordPress plugin Enhanced YouTube Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: enhanced-youtube-...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Aug 9, 2011
  • Latest release: Jun 23, 2014
  • Number of updates: 124
  • Update frequency: every 8.5 days
  • Top authors: Le-Pixel-Solitaire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /13,053 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5747
    Function add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

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

This is a short check of server-side resources used by Enhanced YouTube Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.41 ▲4.60
Dashboard /wp-admin3.32 ▲0.0249.44 ▼3.64
Posts /wp-admin/edit.php3.37 ▲0.0247.39 ▼2.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.10 ▼14.75
Media Library /wp-admin/upload.php3.25 ▲0.0241.41 ▲5.25
Enhanced YouTube /wp-admin/options-general.php?page=enhanced-youtube-shortcode/enhanced-youtube-shortcode.php3.1931.50

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 17 new options
New WordPress options
pxsol_youtube_hd
pxsol_youtube_showinfo
pxsol_youtube_width
pxsol_youtube_controls
pxsol_youtube_related
widget_recent-posts
pxsol_youtube_height
pxsol_youtube_theme
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Enhanced YouTube Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.39 ▼0.391.93 ▲0.1842.04 ▲0.45
Dashboard /wp-admin2,205 ▲245.77 ▲0.0497.82 ▼6.6841.91 ▼2.60
Posts /wp-admin/edit.php2,122 ▲222.11 ▲0.0539.57 ▼1.4838.21 ▼2.96
Add New Post /wp-admin/post-new.php1,535 ▼523.22 ▲4.97697.94 ▲51.3842.43 ▼17.96
Media Library /wp-admin/upload.php1,410 ▲134.21 ▲0.01103.40 ▲2.0344.52 ▼3.46
Enhanced YouTube /wp-admin/options-general.php?page=enhanced-youtube-shortcode/enhanced-youtube-shortcode.php1,0791.7628.9581.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% 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
    • > GET request to /wp-admin/options-general.php?page=enhanced-youtube-shortcode/enhanced-youtube-shortcode.php
    • > Notice in wp-content/plugins/enhanced-youtube-shortcode/enhanced-youtube-shortcode.php+51
    Undefined index: submit

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/enhanced-youtube-shortcode/enhanced-youtube-shortcode.php:237

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (**Plugin admin page** with the options panel (***top***) & the reminder about how to use the shortcode (***bottom***).) image required
The official readme.txt might help

enhanced-youtube-shortcode/enhanced-youtube-shortcode.php 92% from 13 tests

Analyzing the main PHP file in "Enhanced YouTube Shortcode" version 2.0.1
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 337 characters long)

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
No dangerous file extensions were detected249 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP129234
JavaScript10914
CSS1091

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pxsol-toggle-dark.png4.88KB2.91KB▼ 40.32%
images/pxsol-toggle-yes.png4.63KB2.88KB▼ 37.85%
images/gplv3-88x31.png2.60KB2.53KB▼ 2.96%
images/pxsol-toggle-light.png4.79KB2.88KB▼ 39.80%
images/pxsol-saved-no.png2.72KB2.06KB▼ 24.40%