90% featured-image-from-youtube

Code Review | Featured Image from YouTube

WordPress plugin Featured Image from YouTube scored90%from 54 tests.

About plugin

  • Plugin page: featured-image-fr...
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 8, 2021
  • Latest release: Aug 29, 2021
  • Number of updates: 13
  • Update frequency: every 13.4 days
  • Top authors: davidfcarr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,056 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▼2.87ms] Passed 4 tests

This is a short check of server-side resources used by Featured Image from YouTube
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.44 ▼3.23
Dashboard /wp-admin3.32 ▲0.0251.08 ▲0.10
Posts /wp-admin/edit.php3.38 ▲0.0249.14 ▼5.40
Add New Post /wp-admin/post-new.php5.91 ▲0.03101.17 ▲6.04
Media Library /wp-admin/upload.php3.25 ▲0.0237.67 ▼2.94

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Featured Image from YouTube
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.091.70 ▼0.5444.73 ▲2.01
Dashboard /wp-admin2,189 ▲95.63 ▼0.0294.72 ▲2.6841.74 ▼2.96
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0436.13 ▼0.9134.25 ▼0.96
Add New Post /wp-admin/post-new.php1,535 ▲922.78 ▼0.31646.52 ▼57.0952.79 ▼14.41
Media Library /wp-admin/upload.php1,397 ▼34.19 ▲0.0098.12 ▼12.3043.36 ▼1.55

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
No tags were detected

featured-image-from-youtube/featured-image-from-youtube.php Passed 13 tests

"Featured Image from YouTube" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
124 characters long description:
Quickly add a featured image to posts that include YouTube videos by retrieving the featured image from the YouTube service.

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
There were no executable files found in this plugin288 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31821157
PHP3184888
Sass35141
CSS2002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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
No PNG images were found in this plugin