10% wpbase-video

Code Review | Wordpress Video Tube Plugin

WordPress plugin Wordpress Video Tube Plugin scored10%from 54 tests.

About plugin

  • Plugin page: wpbase-video
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2013
  • Latest release: Aug 7, 2014
  • Number of updates: 46
  • Update frequency: every 8.7 days
  • Top authors: baseapp (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /45,420 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wpbase-video/controller/controller.php+60
    Undefined index: page

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

This is a short check of server-side resources used by Wordpress Video Tube Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.41 ▼32.00
Dashboard /wp-admin2.09 ▼1.267.17 ▼54.13
Posts /wp-admin/edit.php2.09 ▼1.276.26 ▼39.73
Add New Post /wp-admin/post-new.php2.09 ▼3.806.08 ▼86.29
Media Library /wp-admin/upload.php2.09 ▼1.145.49 ▼25.46
Submit Videos /wp-admin/admin.php?page=ba-submit3.0624.24
Settings /wp-admin/admin.php?page=ba-settings2.095.66
Manage Videos /wp-admin/admin.php?page=Video3.0622.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress Video Tube Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.75 ▲0.521.64 ▼0.0439.31 ▼3.08
Dashboard /wp-admin2,230 ▲525.71 ▼0.0386.23 ▼15.4272.15 ▲29.64
Posts /wp-admin/edit.php2,135 ▲351.97 ▼0.0234.72 ▼0.6031.61 ▼2.46
Add New Post /wp-admin/post-new.php1,573 ▲4323.02 ▲0.15747.23 ▲122.3474.23 ▲18.68
Media Library /wp-admin/upload.php1,435 ▲354.12 ▼0.0598.44 ▲4.0066.25 ▲23.70
Submit Videos /wp-admin/admin.php?page=ba-submit1,0121.8038.1337.16
Settings /wp-admin/admin.php?page=ba-settings8442.0424.1425.33
Manage Videos /wp-admin/admin.php?page=Video1,0942.1928.4530.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wpbase-video/controller/controller.php+60
    Undefined index: page
  • The uninstall procedure has failed, leaving 9 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • status
    • widget_theysaidso_widget
    • category_children
    • mail
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Video
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/model/class.Videoba.php+17
    Undefined index: publish
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/views/addform.php+11
    Undefined index: title
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/views/addform.php+14
    Undefined index: description
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/views/addform.php+22
    Undefined index: time
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/views/addform.php+37
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/views/addform.php+40
    Undefined index: embed
    • > GET request to /wp-admin/admin.php?page=ba-submit
    • > Notice in wp-content/plugins/wpbase-video/views/addform.php+87
    Undefined index: tags
    • > GET request to /wp-admin/admin.php?page=ba-settings
    • > User notice in wp-includes/functions.php+5905
    Function is_page was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Video
    • > Notice in wp-content/plugins/wpbase-video/wpbase-video.php+50
    Undefined index: mode
    • > GET request to /wp-admin/admin.php?page=Video
    • > Warning in wp-content/plugins/wpbase-video/views/list_table.php+49
    Declaration of My_List_Table::prepare_items($a) should be compatible with WP_List_Table::prepare_items()
    • > GET request to /wp-admin/admin.php?page=Video
    • > Notice in wp-content/plugins/wpbase-video/views/list_table.php+81
    Undefined offset: 1

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wpbase-video/views/addform.php:37
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpbase-video/views/list_table.php on line 3
    • > PHP Notice
      Undefined index: title in wp-content/plugins/wpbase-video/views/addform.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpbase-video/functions.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wpbase-video/views/list_table.php on line 3
    • > PHP Warning
      Declaration of wordpress::initDB() should be compatible with vsmod::initDB($config = false) in wp-content/plugins/wpbase-video/vsMod.php on line 1230
    • > PHP Notice
      Undefined index: description in wp-content/plugins/wpbase-video/views/addform.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpbase-video/views/list_table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpbase-video/controller/controller.php:3
    • > PHP Warning
      require(./wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/wpbase-video/vsMod.php on line 1222

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Video
    • > Network (severe)
    http://../wp-content/plugins/wpbase-video/images/ba_icon.jpg - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === wpbase-video === )
The official readme.txt might help

wpbase-video/wpbase-video.php 92% from 13 tests

The main file in "Wordpress Video Tube Plugin" v. 2.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,988 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP95291891,632
JavaScript34830252
CSS4104101
Markdown1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity52.00
▷ Minimum class complexity12.00
▷ Maximum class complexity150.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/timebg.png0.13KB0.09KB▼ 24.22%
timebg.png0.13KB0.09KB▼ 24.22%