83% responsive-youtube-video

Code Review | Responsive Youtube Video

WordPress plugin Responsive Youtube Video scored83%from 54 tests.

About plugin

  • Plugin page: responsive-youtub...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 18, 2018
  • Latest release: Jul 19, 2018
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: infyways (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /581 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Responsive Youtube Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.96 ▼2.08
Dashboard /wp-admin3.31 ▲0.0152.09 ▼1.01
Posts /wp-admin/edit.php3.37 ▲0.0147.37 ▼6.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.26 ▼9.66
Media Library /wp-admin/upload.php3.24 ▲0.0144.26 ▲2.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Youtube Video
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.18 ▼0.201.77 ▼0.0345.49 ▼0.91
Dashboard /wp-admin2,192 ▲125.56 ▼0.0589.53 ▲0.1239.44 ▼2.94
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0135.90 ▼0.9334.50 ▼3.24
Add New Post /wp-admin/post-new.php1,526 ▼922.98 ▲4.82686.99 ▲6.9350.82 ▼21.38
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0499.45 ▼4.3446.43 ▲1.18

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/responsive-youtube-video/responsive-youtube.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: youtube responsive video, insert youtube videos, youtube video, reponsive youtube video, youtube

responsive-youtube-video/responsive-youtube.php 77% from 13 tests

Analyzing the main PHP file in "Responsive Youtube Video" version 1.0.0
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("responsive-youtube-video.php" instead of "responsive-youtube.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin71 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1132832
JavaScript17326
CSS10013

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.07
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/youtube.png0.47KB0.45KB▼ 5.77%