72% youtube-quick-shortcode

Code Review | YouTube quick shortcode plugin

WordPress plugin YouTube quick shortcode plugin scored72%from 54 tests.

About plugin

  • Plugin page: youtube-quick-sho...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2014
  • Latest release: Feb 4, 2015
  • Number of updates: 4
  • Update frequency: every 18.0 days
  • Top authors: peeping4dsun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,481 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.00MB] [CPU: ▼5.11ms] Passed 4 tests

An overview of server-side resources used by YouTube quick shortcode plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.01 ▲0.02
Dashboard /wp-admin3.31 ▲0.0149.97 ▼2.33
Posts /wp-admin/edit.php3.36 ▲0.0150.56 ▼0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.57 ▼17.15
Media Library /wp-admin/upload.php3.23 ▲0.0038.84 ▲0.53
YouTube Quick Shortcode Plugin /wp-admin/options-general.php?page=youtube_quick_shortcode3.2431.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

YouTube quick shortcode plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.42 ▼0.191.89 ▲0.0347.41 ▲1.49
Dashboard /wp-admin2,199 ▲195.62 ▼0.0498.33 ▲8.9441.29 ▼6.70
Posts /wp-admin/edit.php2,107 ▲101.99 ▲0.0134.06 ▼1.8733.35 ▼9.16
Add New Post /wp-admin/post-new.php1,531 ▲523.12 ▼0.09715.74 ▲54.5659.10 ▲10.69
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.11110.46 ▼6.2647.19 ▼0.54
YouTube Quick Shortcode Plugin /wp-admin/options-general.php?page=youtube_quick_shortcode9691.9923.3423.67

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=youtube_quick_shortcode
    • > Notice in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php+41
    Undefined variable: youtube_quick_shortcode_plugin_options_control
    • > GET request to /wp-admin/options-general.php?page=youtube_quick_shortcode
    • > Notice in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php+52
    Undefined variable: youtube_quick_shortcode_plugin_options_related
    • > GET request to /wp-admin/options-general.php?page=youtube_quick_shortcode
    • > Notice in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php+63
    Undefined variable: youtube_quick_shortcode_plugin_options_info
    • > GET request to /wp-admin/options-general.php?page=youtube_quick_shortcode
    • > Notice in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php+74
    Undefined variable: youtube_quick_shortcode_plugin_options_size

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/youtube-quick-shortcode/ytube-admin.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: youtube_quick_shortcode_plugin_options_info in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php on line 63
    • > PHP Notice
      Undefined variable: youtube_quick_shortcode_plugin_options_size in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php on line 74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youtube-quick-shortcode/ytube.php:13
    • > PHP Notice
      Undefined variable: youtube_quick_shortcode_plugin_options_related in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php on line 52
    • > PHP Notice
      Undefined variable: youtube_quick_shortcode_plugin_options_control in wp-content/plugins/youtube-quick-shortcode/ytube-admin.php on line 41

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: embed, youtube, shortcode, quick

youtube-quick-shortcode/ytube.php 92% from 13 tests

"YouTube quick shortcode plugin" 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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("youtube-quick-shortcode.php" instead of "ytube.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin170 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24129159
JavaScript10011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions6
▷ Named functions6100.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 were not PNG files found in your plugin