83% responsive-video-embeds

Code Review | Responsive Video Embeds

WordPress plugin Responsive Video Embeds scored83%from 54 tests.

About plugin

  • Plugin page: responsive-video-...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Apr 15, 2012
  • Latest release: Jan 24, 2014
  • Number of updates: 39
  • Update frequency: every 16.7 days
  • Top authors: kevinlearynet (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

3,000+ active /77,929 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Responsive Video Embeds
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.03 ▼6.44
Dashboard /wp-admin3.32 ▲0.0247.67 ▼0.14
Posts /wp-admin/edit.php3.37 ▲0.0151.68 ▲3.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.46 ▼10.60
Media Library /wp-admin/upload.php3.24 ▲0.0136.77 ▲1.28

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Responsive Video Embeds: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.301.68 ▼0.2443.38 ▲1.98
Dashboard /wp-admin2,209 ▲214.85 ▼0.9699.36 ▼9.6738.90 ▼9.12
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0135.24 ▼4.4530.50 ▼5.26
Add New Post /wp-admin/post-new.php1,519 ▼1523.04 ▼0.15673.43 ▼4.4654.35 ▲4.59
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.0397.31 ▼2.8541.39 ▼4.97

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 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)
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/responsive-video-embeds/responsive-video-embeds.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Automatically resized videos, the magic happens when you resize the window) image not found
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

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

The main PHP file in "Responsive Video Embeds" ver. 1.2.5 adds more information about the plugin and also serves as the entry point for this plugin
102 characters long description:
This plugin will automatically resize video embeds, objects and other iframes in a responsive fashion.

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 plugin76 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1234852
JavaScript261024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods375.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-1.png92.68KB0.00KB▼ 100.00%