78% mks-video-embed-with-shortcode

Code Review | MKS Video Embed With Shortcode

WordPress plugin MKS Video Embed With Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: mks-video-embed-w...
  • Plugin version: 1.00
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2
  • WordPress version: 6.3.1
  • First release: Sep 26, 2019
  • Latest release: Sep 26, 2019
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: mksharmaphp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▲2.07ms] Passed 4 tests

A check of server-side resources used by MKS Video Embed With Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5945.11 ▲3.73
Dashboard /wp-admin3.90 ▲0.6052.88 ▼4.89
Posts /wp-admin/edit.php3.95 ▲0.6053.78 ▲5.57
Add New Post /wp-admin/post-new.php6.42 ▲0.54101.13 ▲9.04
Media Library /wp-admin/upload.php3.76 ▲0.5341.72 ▲3.88

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by MKS Video Embed With Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10913.23 ▼1.225.48 ▲3.5442.98 ▼3.28
Dashboard /wp-admin2,245 ▲424.88 ▲0.01109.08 ▼4.9440.03 ▼6.22
Posts /wp-admin/edit.php2,128 ▲282.08 ▼0.0839.71 ▲1.8631.01 ▼5.75
Add New Post /wp-admin/post-new.php1,568 ▲2322.99 ▼0.40616.04 ▼47.4487.85 ▲29.76
Media Library /wp-admin/upload.php1,425 ▲254.35 ▲0.1699.91 ▼23.3145.72 ▼4.62

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mks-video-embed-with-shortcode/include/mks_bsw_help.php
    • > /wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_factory/views/action_message.php
    • > /wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
    • > /wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_shortcode/libs/recaptcha-php-1.11/example-captcha.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MKS_Component' not found in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_form/mks_form.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_bsw_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_labels/mks_bsw_factory_object.labels.php:2
    • > PHP Notice
      Undefined variable: return_url in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_factory/views/action_message.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'MKS_Component' not found in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_factory/mks_factory.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_shortcode/widgets/mks_shortcode_widget.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_labels/mks_bsw_shortcode_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MKS_Component' not found in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_shortcode/mks_shortcode.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/mks-video-embed-with-shortcode/mks_content_manager.php:12
    • > PHP Notice
      Undefined index: recaptcha_response_field in wp-content/plugins/mks-video-embed-with-shortcode/include/mks_components/mks_shortcode/libs/recaptcha-php-1.11/example-captcha.php on line 18

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

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

mks-video-embed-with-shortcode/mks_content_manager.php 92% from 13 tests

The primary PHP file in "MKS Video Embed With Shortcode" version 1.00 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mks-video-embed-with-shortcode.php" instead of "mks_content_manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin12,568 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
CSS12335695,884
SVG4002,709
PHP277377382,588
JavaScript10339571,387

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.89
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods96
▷ Static methods1414.58%
▷ Public methods8790.62%
▷ Protected methods00.00%
▷ Private methods99.38%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
30 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/mks_components/mks_shortcode/images/gm-delete.png0.31KB0.38KB0.00%
include/mks_components/mks_shortcode/images/read-more.png0.17KB0.22KB0.00%
include/mks_components/mks_form/img/colorpicker/colorpicker_hsb_h.png0.99KB0.77KB▼ 21.94%
include/mks_components/mks_form/img/colorpicker/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
include/mks_components/mks_shortcode/images/diag-background-translucent.png0.08KB0.10KB0.00%