10% simple-video-management-system

Code Review | Simple Video Management System

WordPress plugin Simple Video Management System scored10%from 54 tests.

About plugin

  • Plugin page: simple-video-mana...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2019
  • Latest release: Mar 31, 2022
  • Number of updates: 16
  • Update frequency: every 81.6 days
  • Top authors: maximize (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,932 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/simple-video-management-system/app/Vpp_Admin.php+17
    Undefined index: action

Server metrics [RAM: ▲0.33MB] [CPU: ▼3.51ms] Passed 4 tests

Analyzing server-side resources used by Simple Video Management System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.05 ▲0.39
Dashboard /wp-admin3.73 ▲0.3862.86 ▲8.47
Posts /wp-admin/edit.php3.78 ▲0.4245.86 ▼0.87
Add New Post /wp-admin/post-new.php6.26 ▲0.3783.09 ▼12.51
Media Library /wp-admin/upload.php3.73 ▲0.5036.47 ▼1.03

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 136 new files
Database: 2 new tables, 6 new options
New tables
wp_vpp_video
wp_vpp_video_location
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Video Management System
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,184 ▲43815.03 ▲0.4144.47 ▲42.6739.17 ▼2.65
Dashboard /wp-admin2,438 ▲2525.02 ▼0.07113.65 ▲0.7890.84 ▲47.04
Posts /wp-admin/edit.php2,344 ▲2552.29 ▲0.2644.26 ▲3.6935.81 ▼2.21
Add New Post /wp-admin/post-new.php1,774 ▲25523.31 ▲0.18600.04 ▼76.4136.17 ▼17.04
Media Library /wp-admin/upload.php1,636 ▲2484.28 ▲0.1896.81 ▼20.6978.66 ▲31.11

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
These items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_vpp_video_location
    • wp_vpp_video
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simple-video-management-system/app/sites/admin/actions/video_save.php
    • > /wp-content/plugins/simple-video-management-system/s3_video_player_plus.php
    • > /wp-content/plugins/simple-video-management-system/app/sites/admin/views/group_save.php
  • 42× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: webinar in wp-content/plugins/simple-video-management-system/includes/webinar_template.php on line 5
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/simple-video-management-system/app/sites/admin/layouts/default.php:12
    • > PHP Warning
      require(VPP_APP_PATH/Vpp_Form.php): failed to open stream: No such file or directory in wp-content/plugins/simple-video-management-system/app/sites/admin/views/video_edit.php on line 7
    • > PHP Notice
      Undefined variable: load_ball_url in wp-content/plugins/simple-video-management-system/includes/media_form.php on line 8
    • > PHP Notice
      Undefined index: subject in wp-content/plugins/simple-video-management-system/includes/webinar_template.php on line 17
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-video-management-system/includes/webinar_template.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/simple-video-management-system/includes/webinar_template.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/simple-video-management-system/app/sites/admin/views/videos.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/simple-video-management-system/app/sites/admin/views/video_analytics.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/simple-video-management-system/app/sites/admin/views/groups.php:28

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (https://mynams.com/svms-screenshots/screen-1.jpg), #2 (https://mynams.com/svms-screenshots/screen-2.jpg), #3 (https://mynams.com/svms-screenshots/screen-3.jpg)
You can take inspiration from this readme.txt

simple-video-management-system/s3_video_player_plus.php 92% from 13 tests

This is the main PHP file of "Simple Video Management System" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-video-management-system.php" instead of "s3_video_player_plus.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin37,499 lines of code in 97 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript457,33412,18023,332
PHP321,2071,2818,133
CSS13964985,134
LESS1144278755
JSON40079
Markdown19038
SVG10028

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity79.00
▷ Minimum class complexity1.00
▷ Maximum class complexity264.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods159
▷ Static methods6339.62%
▷ Public methods6742.14%
▷ Protected methods9257.86%
▷ Private methods00.00%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants3096.77%
▷ Class constants13.23%
▷ Public constants1100.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
17 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/icons/check.png0.69KB0.58KB▼ 15.32%
includes/icons/Duplicate.png25.88KB10.42KB▼ 59.71%
includes/images/bg_shade.png0.38KB0.38KB▼ 0.52%
includes/cross.png0.66KB0.64KB▼ 2.37%
includes/icons/video.png0.28KB0.24KB▼ 13.83%