83% responsive-video-light

Code Review | Responsive Video Light

WordPress plugin Responsive Video Light scored 83% from 54 tests.

About plugin

  • Plugin page: responsive-video-...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 5.9.2
  • First release: Jan 13, 2013
  • Latest release: May 24, 2019
  • Number of updates: 66
  • Update frequency: every 35.2 days
  • Top authors: billknechtel (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active / 33,887 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼309.83ms] Passed 4 tests

Analyzing server-side resources used by Responsive Video Light
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0155.26 ▲2.31
Dashboard /wp-admin3.43 ▲0.0234.59 ▼10.64
Posts /wp-admin/edit.php3.65 ▲0.0241.97 ▲1.86
Add New Post /wp-admin/post-new.php6.89 ▼0.0896.22 ▼1,231.00
Media Library /wp-admin/upload.php3.31 ▲0.0124.98 ▲0.48
Responsive Video Light /wp-admin/options-general.php?page=rvl_options3.3421.47

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Video Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,806 ▲5215.80 ▼0.216.16 ▲0.162.32 ▼0.36
Dashboard /wp-admin2,901 ▲436.08 ▼0.11119.72 ▼16.58153.81 ▼9.21
Posts /wp-admin/edit.php2,693 ▲53.23 ▼0.01104.08 ▲39.49155.37 ▲7.24
Add New Post /wp-admin/post-new.php1,718 ▲5721.26 ▼1.45431.45 ▲10.56180.60 ▼31.08
Media Library /wp-admin/upload.php1,707 ▲65.50 ▼0.03152.81 ▲21.29193.79 ▼0.35
Responsive Video Light /wp-admin/options-general.php?page=rvl_options1,7552.7481.54190.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+18
    Undefined index: disable_youtube_related_videos
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+35
    Undefined index: enable_youtube_autoplay
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+51
    Undefined index: disable_youtube_showinfo
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+71
    Undefined index: enable_modest_branding
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+89
    Undefined index: youtube_wmode
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+113
    Undefined index: youtube_theme
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+161
    Undefined index: disable_vimeo_title_display
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+176
    Undefined index: disable_vimeo_byline_display
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+190
    Undefined index: disable_vimeo_portrait_display
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+204
    Undefined index: enable_vimeo_autoplay
    • > GET request to /wp-admin/options-general.php?page=rvl_options
    • > Notice in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php+220
    Undefined index: enable_vimeo_loop

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php
    • > /wp-content/plugins/responsive-video-light/templates/rvl_plugin_options_head.php
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 113
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 112
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 204
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 87
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 88
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 220
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 51
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/responsive-video-light/templates/rvl_plugin_options.php on line 161

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === responsive-video-light === )
Please take inspiration from this readme.txt

responsive-video-light/responsive-video-light.php Passed 13 tests

The primary PHP file in "Responsive Video Light" version 1.5.2 is used by WordPress to initiate all plugin functionality
52 characters long description:
A plugin to add responsive videos to pages and posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected613 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33656577
CSS35436

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected