10% videonab

Code Review | VideoNab

WordPress plugin VideoNab scored 10% from 54 tests.

About plugin

  • Plugin page: videonab
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.4
  • WordPress version: 6.3.1
  • First release: Sep 1, 2014
  • Latest release: Aug 5, 2015
  • Number of updates: 93
  • Update frequency: every 3.7 days
  • Top authors: JoshSears31 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 2,270 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/videonab/index.php+34
    Non-static method VHub_Main::register_post_types() should not be called statically

Server metrics [RAM: ▲0.22MB] [CPU: ▲3.35ms] Passed 4 tests

This is a short check of server-side resources used by VideoNab
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.82 ▲3.71
Dashboard /wp-admin3.54 ▲0.2461.04 ▲16.75
Posts /wp-admin/edit.php3.62 ▲0.2651.33 ▲11.38
Add New Post /wp-admin/post-new.php6.11 ▲0.2287.77 ▼11.47
Media Library /wp-admin/upload.php3.43 ▲0.2040.51 ▲9.77
VideoNab /wp-admin/edit.php?post_type=crbh_videos3.5142.31
Video Updater /wp-admin/edit.php?post_type=crbh_videos&page=video-updater3.4738.31
Video Categories /wp-admin/edit-tags.php?taxonomy=crbh_video_cats&post_type=crbh_videos3.4539.86
Add New Video /wp-admin/edit.php?post_type=crbh_videos&page=add-new-video-replay3.4740.81
Video Removal /wp-admin/edit.php?post_type=crbh_videos&page=video-removal3.4547.49

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

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

Browser metrics Passed 4 tests

VideoNab: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,345 ▲1,61017.34 ▲2.9670.12 ▲68.52268.50 ▲228.92
Dashboard /wp-admin2,419 ▲2306.67 ▲1.72122.13 ▼1.4389.77 ▲41.42
Posts /wp-admin/edit.php2,324 ▲2353.58 ▲1.5948.98 ▲9.6668.47 ▲31.73
Add New Post /wp-admin/post-new.php1,581 ▲6217.89 ▼5.37608.63 ▼24.02142.14 ▲94.20
Media Library /wp-admin/upload.php1,458 ▲704.44 ▲0.2584.46 ▼9.9574.54 ▲35.73
VideoNab /wp-admin/edit.php?post_type=crbh_videos1,3063.5049.7865.13
Settings /wp-admin/crbn-settings.php260.440.1411.06
Video Updater /wp-admin/edit.php?post_type=crbh_videos&page=video-updater1,0383.2241.7368.03
Video Categories /wp-admin/edit-tags.php?taxonomy=crbh_video_cats&post_type=crbh_videos1,5253.3243.4961.35
Add New Video /wp-admin/edit.php?post_type=crbh_videos&page=add-new-video-replay1,0763.2445.7685.44
Video Removal /wp-admin/edit.php?post_type=crbh_videos&page=video-removal1,0353.2544.6344.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/videonab/includes/shortcode.php
  • 509× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(Zend/Gdata/Extension.php): failed to open stream: No such file or directory in wp-content/plugins/videonab/lib/Zend/Gdata/YouTube/Extension/Recorded.php on line 27
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/videonab/lib/Google/Service/Compute.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/videonab/lib/Google/Service/YouTubeAnalytics.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/videonab/lib/Google/Service/Reseller.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/videonab/lib/Google/Service/SiteVerification.php:31
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Gdata/Entry.php' (include_path='.:/usr/share/php') in wp-content/plugins/videonab/lib/Zend/Gdata/Spreadsheets/Extension/Custom.php on line 26
    • > PHP Warning
      require_once(Zend/Gdata/Extension.php): failed to open stream: No such file or directory in wp-content/plugins/videonab/lib/Zend/Gdata/YouTube/Extension/Location.php on line 27
    • > PHP Warning
      require_once(Zend/Gdata/Extension.php): failed to open stream: No such file or directory in wp-content/plugins/videonab/lib/Zend/Gdata/YouTube/Extension/Books.php on line 27
    • > PHP Warning
      require_once(Zend/Gdata/App/Extension.php): failed to open stream: No such file or directory in wp-content/plugins/videonab/lib/Zend/Gdata/App/Extension/Name.php on line 27
    • > PHP Notice
      Undefined variable: container_tag_class_name in wp-content/plugins/videonab/lib/carbon-fields/admin-templates/container-theme-options.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/crbn-settings.php
    • > Network (severe)
    wp-admin/crbn-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: add my videos, list videos, share videos, video comments, add videos...

videonab/index.php 85% from 13 tests

"VideoNab" version 1.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("videonab.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 145 characters long)

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
Good job! No executable or dangerous file extensions detected187,505 lines of code in 372 files:
LanguageFilesBlank linesComment linesLines of code
PHP35714,06843,897185,081
JavaScript73831401,477
CSS511324839
PO File1282880
SVG10020
XML1008

PHP code Passed 2 tests

This is a very shot review 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.04
Average class complexity1.55
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity1.07
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes3,253
▷ Abstract classes110.34%
▷ Concrete classes3,24299.66%
▷ Final classes00.00%
Methods24,824
▷ Static methods530.21%
▷ Public methods24,64699.28%
▷ Protected methods1370.55%
▷ Private methods410.17%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants259
▷ Global constants62.32%
▷ Class constants25397.68%
▷ Public constants253100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
34 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/carbon-fields/css/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
lib/carbon-fields/css/images/ui-icons_ffffff_256x240.png4.27KB4.11KB▼ 3.78%
lib/carbon-fields/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
css/images/tooltip-tick.png2.92KB0.20KB▼ 93.30%
css/images/true-false.png19.69KB6.29KB▼ 68.05%