10% youtube-not-found

Code Review | Youtube Not Found

WordPress plugin Youtube Not Found scored10%from 54 tests.

About plugin

  • Plugin page: youtube-not-found
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: May 1, 2013
  • Latest release: Sep 13, 2014
  • Number of updates: 20
  • Update frequency: every 25.1 days
  • Top authors: mindstien (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /3,205 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/youtube-not-found/classes/sunrise.class.php+76
    Only variables should be passed by reference

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

Analyzing server-side resources used by Youtube Not Found
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.32 ▼37.43
Dashboard /wp-admin2.05 ▼1.256.17 ▼41.30
Posts /wp-admin/edit.php2.05 ▼1.317.31 ▼37.57
Add New Post /wp-admin/post-new.php2.05 ▼3.845.97 ▼104.28
Media Library /wp-admin/upload.php2.05 ▼1.185.67 ▼28.09
Youtube Not Found /wp-admin/options-general.php?page=youtube-not-found2.055.56

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
ytnf_log_email
widget_theysaidso_widget
db_upgraded
youtube_not_found_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Youtube Not Found
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲16014.08 ▼0.244.63 ▲2.7837.75 ▼7.98
Dashboard /wp-admin2,214 ▲595.86 ▲0.19100.60 ▼8.3837.52 ▼6.96
Posts /wp-admin/edit.php2,097 ▲52.03 ▼0.0242.56 ▼6.4236.15 ▼6.28
Add New Post /wp-admin/post-new.php1,521 ▲223.49 ▲0.28672.08 ▲70.7754.43 ▲1.07
Media Library /wp-admin/upload.php1,399 ▲144.24 ▼0.0098.81 ▼1.3341.44 ▼4.32
Youtube Not Found /wp-admin/options-general.php?page=youtube-not-found1,5605.69138.2974.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/youtube-not-found/classes/sunrise.class.php+76
    Only variables should be passed by reference
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • youtube_not_found_options
    • theysaidso_admin_options
    • ytnf_log_email
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=youtube-not-found
    • > Notice in wp-content/plugins/youtube-not-found/classes/sunrise.class.php+76
    Only variables should be passed by reference
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-not-found
    • > Notice in wp-content/plugins/youtube-not-found/classes/sunrise.class.php+251
    Undefined index: action
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-not-found
    • > Notice in wp-content/plugins/youtube-not-found/inc/sunrise/views/notifications.php+33
    Undefined index: message
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-not-found
    • > Notice in wp-content/plugins/youtube-not-found/inc/sunrise/views/html.php+1
    Undefined index: triggable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=youtube-not-found
    • > Notice in wp-content/plugins/youtube-not-found/inc/sunrise/views/closetab.php+2
    Undefined index: actions

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 items
  • 13× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/opentab.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/size.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/radio.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/title.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/text.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/checkbox.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/hidden.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/select.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/textarea.php
    • > /wp-content/plugins/youtube-not-found/inc/sunrise/views/number.php
  • 232× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/youtube-not-found/inc/sunrise/views/upload.php on line 1
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/youtube-not-found/inc/sunrise/views/html.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/youtube-not-found/inc/sunrise/views/select.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/youtube-not-found/inc/sunrise/options.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/youtube-not-found/inc/sunrise/views/number.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/youtube-not-found/inc/sunrise/views/select.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/youtube-not-found/inc/sunrise/views/number.php on line 2
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/youtube-not-found/inc/sunrise/views/text.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/youtube-not-found/inc/sunrise/views/color.php on line 6
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/youtube-not-found/inc/sunrise/views/editor.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=youtube-not-found
    • > Network (severe)
    http://www.mindstien.com/plugin_frame.php?id=youtube_not_found - 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 uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

youtube-not-found/youtube-not-found.php 92% from 13 tests

The main PHP file in "Youtube Not Found" ver. 2.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 282 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,778 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP26148182986
JavaScript3136224689
CSS33023103

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/new_sub_button.png6.39KB2.77KB▼ 56.56%
assets/images/newsletter.png2.31KB1.70KB▼ 26.50%
assets/images/success.png0.62KB0.62KB0.00%
assets/images/link.png0.69KB0.70KB0.00%
assets/images/youtube_logo.png0.64KB0.55KB▼ 14.16%