10% video-sidebar-widget

Code Review | Video Url

WordPress plugin Video Url scored10%from 54 tests.

About plugin

  • Plugin page: video-sidebar-widget
  • Plugin version: 1.0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4
  • WordPress version: 6.3.1
  • First release: Nov 29, 2012
  • Latest release: Dec 16, 2014
  • Number of updates: 50
  • Update frequency: every 15.1 days
  • Top authors: ulshamim (86%)snow_walker (16%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /18,395 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
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/video-sidebar-widget/widget_url.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Video_Widget has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼60.27ms] Passed 4 tests

Server-side resources used by Video Url
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.386.33 ▼44.72
Dashboard /wp-admin2.11 ▼1.205.93 ▼46.75
Posts /wp-admin/edit.php2.11 ▼1.255.93 ▼48.76
Add New Post /wp-admin/post-new.php2.11 ▼3.785.56 ▼100.85
Media Library /wp-admin/upload.php2.11 ▼1.126.64 ▼34.96
Edit Page /wp-admin/admin.php?page=edit-page2.116.55
Delete Page /wp-admin/admin.php?page=delete-page2.115.50

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: 2 new tables, 7 new options
New tables
wp_videourl
wp_newfield
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_video-widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Video Url
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18513.83 ▼0.7225.57 ▲23.7542.46 ▼2.09
Dashboard /wp-admin2,211 ▲315.51 ▼0.1298.71 ▲13.1443.08 ▼1.38
Posts /wp-admin/edit.php2,116 ▲131.97 ▲0.0035.52 ▼9.5334.08 ▼6.98
Add New Post /wp-admin/post-new.php1,542 ▲1423.35 ▲0.16656.70 ▼48.0561.55 ▼5.58
Media Library /wp-admin/upload.php1,413 ▲104.12 ▼0.07100.24 ▼4.0946.20 ▲2.23
Edit Page /wp-admin/admin.php?page=edit-page7852.0227.9827.97
Delete Page /wp-admin/admin.php?page=delete-page7992.0325.2822.50

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
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/video-sidebar-widget/widget_url.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Video_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_video-widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=delete-page
    • > Deprecated in wp-content/plugins/video-sidebar-widget/widget_url.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Video_Widget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=delete-page
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Video_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=delete-page
    • > Notice in wp-content/plugins/video-sidebar-widget/delete.php+4
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=edit-page
    • > Notice in wp-content/plugins/video-sidebar-widget/video_edit.php+6
    Constant PRO_TABLE_PREFIX already defined

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 fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-sidebar-widget/widget_url.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/video-sidebar-widget/videourl.php:13
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/video-sidebar-widget/videourl.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

video-sidebar-widget/videourl.php 92% from 13 tests

The entry point to "Video Url" version 1.0.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("video-sidebar-widget.php" instead of "videourl.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
Everything looks great! No dangerous files found in this plugin242 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44919242

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.42KB16.38KB▼ 67.51%
screenshot-3.png48.74KB15.61KB▼ 67.97%
screenshot-2.png102.43KB40.03KB▼ 60.92%