78% fetch-youtube-channel-videos

Code Review | Fetch Youtube Channel Videos

WordPress plugin Fetch Youtube Channel Videos scored78%from 54 tests.

About plugin

  • Plugin page: fetch-youtube-cha...
  • Plugin version: 1.1
  • PHP compatiblity: 4.7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Aug 30, 2018
  • Latest release: Aug 30, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: meetsohail (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Fetch Youtube Channel Videos
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.00 ▼7.50
Dashboard /wp-admin3.33 ▲0.0344.59 ▼9.17
Posts /wp-admin/edit.php3.38 ▲0.0245.94 ▼3.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.31 ▼10.62
Media Library /wp-admin/upload.php3.25 ▲0.0233.78 ▼3.37
Youtube Channel Videos /wp-admin/options-general.php?page=youtube-channel-videos3.2230.63

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

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

Browser metrics Passed 4 tests

Fetch Youtube Channel Videos: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.72 ▼0.464.11 ▲2.0043.46 ▼0.56
Dashboard /wp-admin2,210 ▲194.84 ▼1.09109.61 ▲5.5239.53 ▼3.29
Posts /wp-admin/edit.php2,090 ▲12.03 ▼0.0139.97 ▲4.2135.34 ▼1.26
Add New Post /wp-admin/post-new.php1,536 ▲823.35 ▲0.00627.84 ▼48.8753.31 ▲0.65
Media Library /wp-admin/upload.php1,392 ▲104.24 ▲0.0495.64 ▼1.8143.66 ▲0.69
Youtube Channel Videos /wp-admin/options-general.php?page=youtube-channel-videos8772.1928.1725.57

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_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/fetch-youtube-channel-videos/admin-panel/panel.php
  • 3× 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/fetch-youtube-channel-videos/admin-panel/fycv_functions.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/fetch-youtube-channel-videos/admin-panel/form.php:2
    • > PHP Warning
      Use of undefined constant FYCV_DIR - assumed 'FYCV_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/fetch-youtube-channel-videos/admin-panel/panel.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === fetch-youtube-channel-videos === )
You can take inspiration from this readme.txt

fetch-youtube-channel-videos/fetch-youtube-channel-videos.php 92% from 13 tests

This is the main PHP file of "Fetch Youtube Channel Videos" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected207 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP478207

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/account-settings.png17.08KB6.82KB▼ 60.05%