73% video-player-pro

Code Review | Video Player Pro

WordPress plugin Video Player Pro scored73%from 54 tests.

About plugin

  • Plugin page: video-player-pro
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2021
  • Latest release: Mar 4, 2023
  • Number of updates: 16
  • Update frequency: every 47.4 days
  • Top authors: idealand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /906 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▼6.07ms] Passed 4 tests

Analyzing server-side resources used by Video Player Pro
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3442.52 ▲5.54
Dashboard /wp-admin4.05 ▲0.7051.47 ▼11.77
Posts /wp-admin/edit.php4.10 ▲0.7447.13 ▲1.58
Add New Post /wp-admin/post-new.php6.63 ▲0.7482.87 ▼18.68
Media Library /wp-admin/upload.php3.97 ▲0.7439.13 ▲4.59

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 81 new files
Database: 3 new tables, 7 new options
New tables
wp_vpp_video_meta
wp_vpp_video
wp_vpp_video_tag
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
vpp_config

Browser metrics Passed 4 tests

This is an overview of browser requirements for Video Player Pro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17313.62 ▼0.688.95 ▲7.0741.12 ▼0.20
Dashboard /wp-admin2,219 ▲285.83 ▼0.0398.97 ▼7.9137.76 ▼7.60
Posts /wp-admin/edit.php2,102 ▲131.97 ▼0.0935.45 ▼1.2131.89 ▼0.59
Add New Post /wp-admin/post-new.php1,542 ▲923.17 ▼0.08647.41 ▲14.6373.65 ▲7.67
Media Library /wp-admin/upload.php1,404 ▲164.28 ▲0.0893.31 ▼5.4341.64 ▼4.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_vpp_video
    • wp_vpp_video_meta
    • wp_vpp_video_tag
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • vpp_config
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/video-player-pro/include/VPP_STUDIO.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/ajax/VPP_AJAX_VIDEO_SAVE.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/ajax/VPP_AJAX_PAGE_PRO_VERSION.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/video-player-pro/include/player/VPP_SKIN_MANAGEMENT.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/ajax/VPP_AJAX_VIDEO_SEARCH.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/page/VPP_PAGE_PRO_VERSION.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/ajax/VPP_AJAX_POPUP_CREATE.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/player/ajax/VPP_AJAX_AUTO_VIDEO_CHANGE.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/ajax/VPP_AJAX_POPUP.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-player-pro/include/studio/page/VPP_PAGE_VIDEO_EDIT.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: player, youtube, html5 player, video, skin youtube...

video-player-pro/main.php 77% from 13 tests

The principal PHP file in "Video Player Pro" v. 1.1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("video-player-pro.php" instead of "main.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin16,723 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
CSS112,0981628,744
PHP361,2831,3124,364
JavaScript67353631,920
SVG1001,280
PO File1180238415

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.56
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods165
▷ Static methods4426.67%
▷ Public methods15292.12%
▷ Protected methods00.00%
▷ Private methods137.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.86MB with 0.51MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/thor-version.png836.96KB251.50KB▼ 69.95%
assets/img/Plugin-Logo.png46.94KB24.57KB▼ 47.66%