83% wp-responsive-videos

Code Review | WP Responsive Videos

WordPress plugin WP Responsive Videos scored 83% from 54 tests.

About plugin

  • Plugin page: wp-responsive-videos
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.9.2
  • First release: Apr 16, 2014
  • Latest release: Apr 30, 2014
  • Number of updates: 14
  • Update frequency: every 1.3 days
  • Top authors: nijjar.login (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 6,578 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WP Responsive Videos
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0456.12 ▲8.53
Dashboard /wp-admin3.44 ▲0.0437.17 ▲3.67
Posts /wp-admin/edit.php3.68 ▲0.0444.05 ▼38.88
Add New Post /wp-admin/post-new.php6.91 ▼0.0594.47 ▼1,182.14
Media Library /wp-admin/upload.php3.33 ▲0.0428.48 ▼3.58

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_wprv_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Responsive Videos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲3915.54 ▼0.086.07 ▲0.402.78 ▲0.36
Dashboard /wp-admin2,881 ▲206.14 ▼0.08116.97 ▼17.41160.12 ▼8.79
Posts /wp-admin/edit.php2,694 ▼03.24 ▼0.0165.79 ▲2.40144.78 ▼1.12
Add New Post /wp-admin/post-new.php1,690 ▼2122.06 ▲1.28446.04 ▼13.30162.42 ▲7.10
Media Library /wp-admin/upload.php1,698 ▼05.55 ▲0.02142.39 ▲1.38191.56 ▲3.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_wprv_widget

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-responsive-videos/lib/widgets/wp-responsive-video-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-responsive-videos/lib/widgets/wp-responsive-video-widget.php:3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-responsive-videos/lib/core-functions.php on line 4
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-responsive-videos/lib/core-functions.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-responsive-videos/lib/widgets/wp-responsive-video-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Contributors not specified
The official readme.txt might help

wp-responsive-videos/wp-resposive-videos.php 85% from 13 tests

Analyzing the main PHP file in "WP Responsive Videos" version 1.1.1
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-responsive-videos.php" instead of "wp-resposive-videos.php")
  • Version: Plugin version missing

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin170 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45814156
CSS11014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin