84% mine-cloudvod

Code Review | Video and Audio Player for Wordpress - Mine CloudVod LMS

WordPress plugin Video and Audio Player for Wordpress - Mine CloudVod LMS scored84%from 54 tests.

About plugin

  • Plugin page: mine-cloudvod
  • Plugin version: 1.8.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.4
  • WordPress version: 6.3.1
  • First release: Apr 30, 2021
  • Latest release: Nov 22, 2023
  • Number of updates: 319
  • Update frequency: every 2.9 days
  • Top authors: 0 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /16,624 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.18MB] [CPU: ▲29.92ms] Passed 4 tests

This is a short check of server-side resources used by Video and Audio Player for Wordpress - Mine CloudVod LMS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /7.72 ▲4.2675.16 ▲30.56
Dashboard /wp-admin7.48 ▲4.1483.61 ▲20.10
Posts /wp-admin/edit.php7.56 ▲4.2180.37 ▲34.45
Add New Post /wp-admin/post-new.php10.98 ▲5.09135.81 ▲35.40
Media Library /wp-admin/upload.php7.34 ▲4.1174.75 ▲34.57
Tags /wp-admin/edit-tags.php?taxonomy=course-tag&post_type=mcv_course7.4366.84
Settings /wp-admin/admin.php?page=mcv-options7.4371.95
Orders /wp-admin/edit.php?post_type=mcv_order7.5470.50
CloudVod Hub /wp-admin/edit.php?post_type=mcv_video7.5065.64
Add-ons /wp-admin/admin.php?page=mcv-addons7.3258.10
Categories /wp-admin/edit-tags.php?taxonomy=course-category&post_type=mcv_course7.4375.76
Course /wp-admin/edit.php?post_type=mcv_course7.5467.61

Server storage [IO: ▲14.79MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 458 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
db_upgraded
_mcv_permalinks_flushed
mcv_settings
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Video and Audio Player for Wordpress - Mine CloudVod LMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,074 ▲30217.91 ▲3.51131.43 ▲129.5242.70 ▼4.63
Dashboard /wp-admin2,258 ▲785.59 ▲0.0081.01 ▼19.9182.95 ▲40.21
Posts /wp-admin/edit.php2,365 ▲2656.44 ▲4.43166.28 ▲127.1332.06 ▼5.72
Add New Post /wp-admin/post-new.php1,697 ▲17128.66 ▲5.61851.25 ▲174.70106.88 ▲39.61
Media Library /wp-admin/upload.php1,550 ▲1534.19 ▼0.0799.55 ▼13.3378.54 ▲30.70
Tags /wp-admin/edit-tags.php?taxonomy=course-tag&post_type=mcv_course1,5503.7871.8078.29
Settings /wp-admin/admin.php?page=mcv-options4,2744.2368.5198.91
Orders /wp-admin/edit.php?post_type=mcv_order1,5437.86107.3396.01
CloudVod Hub /wp-admin/edit.php?post_type=mcv_video1,18212.06196.88118.59
Add-ons /wp-admin/admin.php?page=mcv-addons1,6917.03106.9098.61
Categories /wp-admin/edit-tags.php?taxonomy=course-category&post_type=mcv_course1,5763.7953.9780.16
Course /wp-admin/edit.php?post_type=mcv_course1,5748.0399.56109.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • mcv_settings
    • _mcv_permalinks_flushed
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 36× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/media.php' (include_path='.:/usr/share/php') in wp-content/plugins/mine-cloudvod/inc/RestApi/AliyunVod.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/mine-cloudvod/inc/options/aliyunoss.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/mine-cloudvod/build/embed/render.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/mine-cloudvod/inc/Integrations/Elementor/McvVideoWidget.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'MCSF' not found in wp-content/plugins/mine-cloudvod/inc/options/aliyunvod_touwei.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mine-cloudvod/templates/ketang/checkout.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MineCloudvod\\Payment\\Base' not found in wp-content/plugins/mine-cloudvod/inc/Payment/Hupijiao.php:4
    • > PHP Notice
      Trying to get property 'query_vars' of non-object in wp-content/plugins/mine-cloudvod/build/lms/course-list/filter-item-mode.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/mine-cloudvod/templates/vod/note.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mine-cloudvod/inc/MineTcVodClientUploader.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: youku, player, lms, bili, course...

mine-cloudvod/mine-cloudvod.php 92% from 13 tests

The principal PHP file in "Video and Audio Player for Wordpress - Mine CloudVod LMS" v. 1.8.9 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin64,152 lines of code in 387 files:
LanguageFilesBlank linesComment linesLines of code
PHP2485,1442,82429,875
SVG70013,266
JavaScript531,4193,9937,235
CSS325525687,222
Sass1696935,667
JSON2200869
HTML904318

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity22.01
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces26
Interfaces0
Traits0
Classes171
▷ Abstract classes42.34%
▷ Concrete classes16797.66%
▷ Final classes00.00%
Methods1,029
▷ Static methods13413.02%
▷ Public methods1,00998.06%
▷ Protected methods70.68%
▷ Private methods131.26%
Functions125
▷ Named functions7761.60%
▷ Anonymous functions4838.40%
Constants44
▷ Global constants4295.45%
▷ Class constants24.55%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/img/addons/mcv-partialpurchase.png1.79KB1.12KB▼ 37.68%
templates/default/assets/images/default.png5.66KB1.60KB▼ 71.69%
static/img/addons/mcv-preview.png1.82KB0.78KB▼ 56.98%
static/img/default.png5.66KB1.60KB▼ 71.69%
csf/assets/images/checkerboard.png2.29KB2.54KB0.00%