10% display-you-tube-videos

Code Review | Display You Tube Videos

WordPress plugin Display You Tube Videos scored10%from 54 tests.

About plugin

  • Plugin page: display-you-tube-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1
  • WordPress version: 6.3.1
  • First release: May 5, 2014
  • Latest release: Jul 24, 2016
  • Number of updates: 25
  • Update frequency: every 32.5 days
  • Top authors: er.sushilg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,459 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/display-you-tube-videos/index.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; display_you_tube_video has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼51.88ms] Passed 4 tests

Analyzing server-side resources used by Display You Tube Videos
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.88 ▼31.79
Dashboard /wp-admin2.08 ▼1.235.78 ▼43.43
Posts /wp-admin/edit.php2.08 ▼1.285.65 ▼43.56
Add New Post /wp-admin/post-new.php2.08 ▼3.816.09 ▼88.74
Media Library /wp-admin/upload.php2.08 ▼1.155.01 ▼31.21

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_display_you_tube_video
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Display You Tube Videos
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.30 ▼0.884.40 ▲2.3745.25 ▲7.06
Dashboard /wp-admin2,206 ▲155.91 ▲1.0098.15 ▼6.4641.77 ▼0.60
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0134.74 ▼7.2436.52 ▲0.63
Add New Post /wp-admin/post-new.php1,524 ▲123.42 ▲0.29596.43 ▼84.4049.44 ▼13.28
Media Library /wp-admin/upload.php1,385 ▲34.21 ▼0.0798.81 ▼15.5139.64 ▼4.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/display-you-tube-videos/index.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; display_you_tube_video has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_display_you_tube_video
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/display-you-tube-videos/index.php:10

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 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (screenshot is backend widget and deatiails of plugin.), #2 (Showing video on front end sidebar.)
You can look at the official readme.txt

display-you-tube-videos/index.php 92% from 13 tests

The primary PHP file in "Display You Tube Videos" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("display-you-tube-videos.php" instead of "index.php")

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 plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin