84% youtube-thumbnail-to-featured-image

Code Review | Youtube Thumbnail as Featured Image

WordPress plugin Youtube Thumbnail as Featured Image scored84%from 54 tests.

About plugin

  • Plugin page: youtube-thumbnail...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Apr 21, 2015
  • Latest release: Oct 30, 2019
  • Number of updates: 3
  • Update frequency: every 550.7 days
  • Top authors: jesusbet (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /6,020 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.66ms] Passed 4 tests

Analyzing server-side resources used by Youtube Thumbnail as Featured Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.97 ▼2.98
Dashboard /wp-admin3.31 ▲0.0146.06 ▼3.57
Posts /wp-admin/edit.php3.36 ▲0.0048.40 ▼0.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.65 ▼3.40
Media Library /wp-admin/upload.php3.23 ▲0.0036.12 ▲3.22

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Youtube Thumbnail as Featured Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.10 ▼0.231.95 ▲0.2744.16 ▼0.54
Dashboard /wp-admin2,195 ▲185.62 ▼0.2090.48 ▼7.2736.54 ▼7.48
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0639.09 ▲5.2634.82 ▼0.70
Add New Post /wp-admin/post-new.php6,228 ▲4,70226.03 ▲2.96950.05 ▲325.5055.37 ▲7.40
Media Library /wp-admin/upload.php1,403 ▲34.15 ▲0.0697.65 ▲2.3046.83 ▲6.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/youtube-thumbnail-to-featured-image/featured-youtube-thumbnail.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: featured image, automatic import, media library, youtube, social networks

youtube-thumbnail-to-featured-image/featured-youtube-thumbnail.php 92% from 13 tests

The principal PHP file in "Youtube Thumbnail as Featured Image" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("youtube-thumbnail-to-featured-image.php" instead of "featured-youtube-thumbnail.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1192563

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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
No PNG files were detected