76% add-youtube-feed

Code Review | Arrow Video Feed, Custom Video Channel Feed

WordPress plugin Arrow Video Feed, Custom Video Channel Feed scored 76% from 54 tests.

About plugin

  • Plugin page: add-youtube-feed
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 5.9.2
  • First release: Jan 27, 2017
  • Latest release: Nov 1, 2019
  • Number of updates: 51
  • Update frequency: every 19.7 days
  • Top authors: arrowplugins (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active / 23,423 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼289.76ms] Passed 4 tests

Analyzing server-side resources used by Arrow Video Feed, Custom Video Channel Feed
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1454.56 ▼2.67
Dashboard /wp-admin3.55 ▲0.1438.68 ▲3.62
Posts /wp-admin/edit.php3.78 ▲0.1442.67 ▼3.36
Add New Post /wp-admin/post-new.php6.99 ▲0.02106.97 ▼1,154.09
Media Library /wp-admin/upload.php3.40 ▲0.1125.30 ▲1.09
Rate us /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_rate_us_plugins3.4127.08
Support /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_form_support3.4323.74
All YouTube Feeds /wp-admin/edit.php?post_type=utbap_youtube_feed3.5429.94
Our Plugins /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_our_plugins3.4127.46
Add New /wp-admin/post-new.php?post_type=utbap_youtube_feed3.8570.46

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 59 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Arrow Video Feed, Custom Video Channel Feed
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,181 ▲43718.45 ▲2.8610.19 ▲2.7218.21 ▲15.66
Dashboard /wp-admin3,158 ▲2978.37 ▲2.13143.50 ▲2.42155.49 ▼17.61
Posts /wp-admin/edit.php2,990 ▲2964.99 ▲1.7683.46 ▲14.95141.87 ▼2.32
Add New Post /wp-admin/post-new.php1,714 ▲5321.33 ▲5.03374.10 ▼69.08161.30 ▲4.82
Media Library /wp-admin/upload.php1,778 ▲805.86 ▲0.41110.34 ▼31.91189.75 ▲4.70
Rate us /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_rate_us_plugins1,3434.7573.65121.41
Support /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_form_support1,4334.8972.78158.22
All YouTube Feeds /wp-admin/edit.php?post_type=utbap_youtube_feed1,6645.4376.25113.67
Our Plugins /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_our_plugins1,5114.7777.21187.93
Add New /wp-admin/post-new.php?post_type=utbap_youtube_feed6,50513.13451.09385.72

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=utbap_youtube_feed&page=utbap_form_support
    • > Notice in wp-content/plugins/add-youtube-feed/includes/utbap-support-page.php+460
    Undefined variable: _SESSION

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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/add-youtube-feed/includes/utbap-rate-us.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/add-youtube-feed/includes/utbap-our-plugins.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/add-youtube-feed/includes/utbap-shortcode.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=utbap_youtube_feed
    • > Network (severe)
    https://apis.google.com/u/0/se/0/_/+1/fastbutton?usegapi=1&size=medium&origin=http%3A%2F%2Fwp.com&url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fadd-youtube-feed%2F&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fabc-static%2F_%2Fjs%2Fk%3Dgapi.lb.en.NnK9YPjtg-w.O%2Fd%3D1%2Frs%3DAHpOoo9KePDGVlGjp-rlXwDM1kUO2Eh4gg%2Fm%3D__features__#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&id=I0_1648544422691&_gfid=I0_1648544422691&parent=http%3A%2F%2Fwp.com&pfname=&rpctoken=69770963 - Failed to load resource: the server responded with a status of 404 ()

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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (2.), #3 (4.), #5 (6.)
Please take inspiration from this readme.txt

add-youtube-feed/youtube-by-arrowplugins.php 92% from 13 tests

The main PHP script in "Arrow Video Feed, Custom Video Channel Feed" version 1.1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("add-youtube-feed.php" instead of "youtube-by-arrowplugins.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected7,452 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS64002433,337
PHP113641372,081
JavaScript66471741,514
SVG100520

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 1.27MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/ilogo.png135.83KB45.77KB▼ 66.31%
includes/images/template2.png103.72KB110.54KB0.00%
includes/images/grid.png15.20KB15.89KB0.00%
includes/images/fb-promo.png211.04KB90.53KB▼ 57.10%
includes/images/double-list.png11.12KB11.61KB0.00%