74% responsive-video-embedder

Code Review | Responsive Video Embedder

WordPress plugin Responsive Video Embedder scored74%from 54 tests.

About plugin

  • Plugin page: responsive-video-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2016
  • Latest release: Jun 17, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: esiteq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,254 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.93ms] Passed 4 tests

An overview of server-side resources used by Responsive Video Embedder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.80 ▼36.88
Dashboard /wp-admin2.05 ▼1.265.24 ▼43.81
Posts /wp-admin/edit.php2.05 ▼1.317.62 ▼34.23
Add New Post /wp-admin/post-new.php2.05 ▼3.846.03 ▼84.81
Media Library /wp-admin/upload.php2.05 ▼1.185.46 ▼28.52

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Video Embedder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15313.63 ▼0.788.23 ▲6.5239.60 ▼4.24
Dashboard /wp-admin2,206 ▲145.92 ▲0.04107.76 ▼5.1537.94 ▼7.64
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0338.19 ▲2.1234.79 ▲3.33
Add New Post /wp-admin/post-new.php1,628 ▲10723.44 ▲0.35665.74 ▲7.9352.88 ▼0.75
Media Library /wp-admin/upload.php1,396 ▲84.23 ▲0.03105.94 ▲5.5345.00 ▼0.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 thickbox 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
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/responsive-video-embedder/responsive-video-embedder.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

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 require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === responsive-video-embedder === )
Please take inspiration from this readme.txt

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

The entry point to "Responsive Video Embedder" version 0.1 is a PHP file that has certain tags in its header comment area
54 characters long description:
Simple yet powerful plugin to insert responsive videos

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
Everything looks great! No dangerous files found in this plugin499 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1421361
CSS151131
Markdown1607

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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 Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/video.png1.61KB0.43KB▼ 73.17%
images/btn-list.png0.14KB0.13KB▼ 3.57%
images/btn-video.png0.38KB0.36KB▼ 6.12%