84% automatic-featured-images-from-videos

Code Review | Automatic Featured Images from Videos

WordPress plugin Automatic Featured Images from Videos scored84%from 54 tests.

About plugin

  • Plugin page: automatic-feature...
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Oct 27, 2023
  • Number of updates: 18
  • Update frequency: every 188.3 days
  • Top authors: tw2113 (72.22%)bradparbs (22.22%)webdevstudios (16.67%)

Code review

54 tests

User reviews

33 reviews

Install metrics

9,000+ active /89,657 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Automatic Featured Images from Videos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.92 ▲0.09
Dashboard /wp-admin3.31 ▼0.0345.05 ▼18.28
Posts /wp-admin/edit.php3.37 ▲0.0142.15 ▼3.65
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.23 ▼5.85
Media Library /wp-admin/upload.php3.23 ▲0.0133.79 ▼0.27

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Automatic Featured Images from Videos
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▲0.351.73 ▲0.0743.39 ▼0.72
Dashboard /wp-admin2,198 ▲185.61 ▼0.0486.43 ▼11.8136.91 ▼8.31
Posts /wp-admin/edit.php2,105 ▲51.99 ▼0.0335.00 ▼1.3733.84 ▲2.29
Add New Post /wp-admin/post-new.php1,533 ▲223.28 ▲0.08653.19 ▼16.4759.55 ▼4.47
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.00103.72 ▲5.6447.85 ▲1.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI' not found in wp-content/plugins/automatic-featured-images-from-videos/includes/cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/automatic-featured-images-from-videos/automatic-featured-images-from-videos.php:30

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: youtube, featured image, vimeo, video

automatic-featured-images-from-videos/automatic-featured-images-from-videos.php 92% from 13 tests

The entry point to "Automatic Featured Images from Videos" version 1.2.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected344 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP497295323
JavaScript14321

PHP code Passed 2 tests

An overview of 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.40
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected