10% auto-video-youtube-poster

Code Review | Auto Video Youtube Poster

WordPress plugin Auto Video Youtube Poster scored10%from 54 tests.

About plugin

  • Plugin page: auto-video-youtub...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2016
  • Latest release: Nov 2, 2016
  • Number of updates: 9
  • Update frequency: every 12.5 days
  • Top authors: gsmetana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,205 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/auto-video-youtube-poster/index.php+16
    Use of undefined constant file_get_html - assumed 'file_get_html' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.79MB] [CPU: ▼47.20ms] Passed 4 tests

Analyzing server-side resources used by Auto Video Youtube Poster
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.2610.46 ▼32.02
Dashboard /wp-admin2.22 ▼1.096.70 ▼41.39
Posts /wp-admin/edit.php2.22 ▼1.147.36 ▼37.60
Add New Post /wp-admin/post-new.php2.22 ▼3.676.47 ▼77.78
Media Library /wp-admin/upload.php2.22 ▼1.016.57 ▼29.69
Auto Video Youtube Poster /wp-admin/options-general.php?page=autovideoyoutubepub2.226.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Auto Video Youtube Poster
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.41 ▲0.031.83 ▲0.0943.76 ▼4.67
Dashboard /wp-admin2,212 ▲214.84 ▼0.07106.76 ▲2.3238.26 ▼0.49
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0440.14 ▲1.1234.15 ▲0.67
Add New Post /wp-admin/post-new.php6,512 ▲4,98419.09 ▼4.09884.03 ▲282.5079.47 ▲30.24
Media Library /wp-admin/upload.php1,394 ▲124.19 ▼0.0099.49 ▼5.8541.71 ▼1.94
Auto Video Youtube Poster /wp-admin/options-general.php?page=autovideoyoutubepub1,8702.0724.7886.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the vp_style.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the vp_style.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the vp_style.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Warning in wp-content/plugins/auto-video-youtube-poster/index.php+16
    Use of undefined constant file_get_html - assumed 'file_get_html' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Warning in wp-content/plugins/auto-video-youtube-poster/index.php+243
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Warning in wp-content/plugins/auto-video-youtube-poster/index.php+243
    file_get_contents(http://cangurotv.com/getDataForUser.php?credential=): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Warning in wp-content/plugins/auto-video-youtube-poster/index.php+249
    Invalid argument supplied for foreach()

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/auto-video-youtube-poster/obtener_img_post.php
    • > /wp-content/plugins/auto-video-youtube-poster/actualizar_img_post.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/auto-video-youtube-poster/index.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Network (severe)
    http://cangurotv.com/videos/dance.mp3 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Network (severe)
    http://cangurotv.com/videos/funky.mp3 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Network (severe)
    http://cangurotv.com/videos/pop.mp3 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Network (severe)
    http://cangurotv.com/videos/sweet.mp3 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=autovideoyoutubepub
    • > Network (severe)
    http://cangurotv.com/videos/scifi.mp3 - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% 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
9 plugin tags: post to youtube, automatic youtube, automatic videos, upload videos youtube, auto video youtube poster...

auto-video-youtube-poster/index.php 85% from 13 tests

"Auto Video Youtube Poster" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("auto-video-youtube-poster.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,590 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43522762,028
CSS1154562

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity123.00
▷ Minimum class complexity42.00
▷ Maximum class complexity197.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods93
▷ Static methods11.08%
▷ Public methods7782.80%
▷ Protected methods1617.20%
▷ Private methods00.00%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants21
▷ Global constants21100.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
4 PNG files occupy 1.17MB with 0.78MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-1544x500.png815.34KB289.75KB▼ 64.46%
icon-256x256.png104.35KB33.90KB▼ 67.51%
banner-772x250.png248.62KB84.06KB▼ 66.19%
icon-128x128.png32.61KB10.94KB▼ 66.44%