77% kernel-video-sharing

Code Review | Kernel Video Sharing Integration

WordPress plugin Kernel Video Sharing Integration scored77%from 54 tests.

About plugin

  • Plugin page: kernel-video-sharing
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2022
  • Latest release: Jan 19, 2023
  • Number of updates: 12
  • Update frequency: every 29.8 days
  • Top authors: kvsteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,450 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.45MB] [CPU: ▲6.54ms] Passed 4 tests

This is a short check of server-side resources used by Kernel Video Sharing Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4143.63 ▲4.66
Dashboard /wp-admin3.79 ▲0.4955.96 ▲8.80
Posts /wp-admin/edit.php3.84 ▲0.4852.70 ▲6.99
Add New Post /wp-admin/post-new.php6.38 ▲0.50100.31 ▲5.72
Media Library /wp-admin/upload.php3.65 ▲0.4245.62 ▲11.05
Help /wp-admin/edit.php?post_type=kvs_video&page=kvs-help3.6238.51
Settings /wp-admin/edit.php?post_type=kvs_video&page=kvs-settings3.6643.20
All KVS Videos /wp-admin/edit.php?post_type=kvs_video3.6945.41

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Kernel Video Sharing Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21315.48 ▲1.551.99 ▲0.2845.26 ▲4.87
Dashboard /wp-admin2,357 ▲1807.07 ▲1.36112.87 ▲23.6349.92 ▲9.93
Posts /wp-admin/edit.php2,175 ▲754.40 ▲2.4151.50 ▲17.5038.72 ▲7.01
Add New Post /wp-admin/post-new.php6,334 ▲4,80824.87 ▲1.78896.12 ▲286.0034.68 ▼19.70
Media Library /wp-admin/upload.php1,479 ▲796.74 ▲2.52106.37 ▲3.6244.77 ▲2.56
Help /wp-admin/edit.php?post_type=kvs_video&page=kvs-help9843.9237.1529.10
Settings /wp-admin/edit.php?post_type=kvs_video&page=kvs-settings9473.8638.9830.18
All KVS Videos /wp-admin/edit.php?post_type=kvs_video1,1844.3252.2933.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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
Good news, no errors were detected

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
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/kernel-video-sharing/admin/partials/help/basic.php
    • > /wp-content/plugins/kernel-video-sharing/admin/partials/help/setup.php
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include(KVS_DIRPATHadmin/partials/settings/feed.php): failed to open stream: No such file or directory in wp-content/plugins/kernel-video-sharing/admin/partials/settings-view.php on line 23
    • > PHP Notice
      Undefined variable: kernel_video_sharing in wp-content/plugins/kernel-video-sharing/admin/partials/settings/rules.php on line 13
    • > PHP Warning
      include(KVS_DIRPATHadmin/partials/help/header.php): failed to open stream: No such file or directory in wp-content/plugins/kernel-video-sharing/admin/partials/help-view.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/kernel-video-sharing/admin/partials/help/header.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Core\\DynamicTags\\Tag' not found in wp-content/plugins/kernel-video-sharing/includes/elementor/dynamic-tags-numeric.php:13
    • > PHP Warning
      include(): Failed opening 'KVS_DIRPATHadmin/partials/settings/feed.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/kernel-video-sharing/admin/partials/settings-view.php on line 23
    • > PHP Warning
      include(): Failed opening 'KVS_DIRPATHadmin/partials/settings/_header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/kernel-video-sharing/admin/partials/settings-view.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/kernel-video-sharing/admin/partials/settings/advanced.php:16
    • > PHP Warning
      Use of undefined constant KVS_DIRPATH - assumed 'KVS_DIRPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kernel-video-sharing/admin/partials/help-view.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_feed_url() on null in wp-content/plugins/kernel-video-sharing/admin/partials/settings/rules.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: videoplayer, tube, video, player

kernel-video-sharing/kvs.php 62% from 13 tests

The main PHP script in "Kernel Video Sharing Integration" version 1.0.9 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kernel-video-sharing.php" instead of "kvs.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 160 characters long)
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.1" instead of "5.6")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,763 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP264298972,518
CSS1133233
JavaScript10012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.60
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods95
▷ Static methods1010.53%
▷ Public methods8993.68%
▷ Protected methods11.05%
▷ Private methods55.26%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants10
▷ Global constants880.00%
▷ Class constants220.00%
▷ 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
No PNG files were detected