83% sidebar-video

Code Review | Sidebar Video

WordPress plugin Sidebar Video scored 83% from 53 tests.

About plugin

  • Plugin page: sidebar-video
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.8.1
  • First release: Dec 4, 2018
  • Latest release: Mar 24, 2021
  • Number of updates: 12
  • Update frequency: every 70.1 days
  • Top authors: mhkanon (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 524 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼268.29ms] Passed 4 tests

A check of server-side resources used by Sidebar Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0447.57 ▲12.63
Dashboard /wp-admin3.11 ▲0.0645.71 ▼6.73
Posts /wp-admin/edit.php3.16 ▲0.0642.11 ▼7.63
Add New Post /wp-admin/post-new.php5.47 ▲0.0494.21 ▼1,051.76
Media Library /wp-admin/upload.php3.05 ▲0.0531.45 ▼7.03

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_svd_register

Browser metrics Passed 4 tests

Checking browser requirements for Sidebar Video
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲11116.02 ▲0.469.04 ▲1.1653.52 ▲2.69
Dashboard /wp-admin2,974 ▲1215.96 ▲0.11140.67 ▲2.46115.05 ▲16.80
Posts /wp-admin/edit.php2,721 ▲152.69 ▼0.0066.38 ▼0.7590.70 ▼3.60
Add New Post /wp-admin/post-new.php1,663 ▲1018.78 ▲0.30372.61 ▲13.24107.61 ▼1.42
Media Library /wp-admin/upload.php1,787 ▲155.05 ▲0.00144.45 ▼3.21102.56 ▼18.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_svd_register

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sidebar-video/svd_menu.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sidebar-video/sidebar-video.php:23

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #4, #5, #6, #7 in sidebar-video/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Requires php: Invalid plugin version format
You can take inspiration from this readme.txt

sidebar-video/sidebar-video.php 85% from 13 tests

The main PHP script in "Sidebar Video" version 1.0.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
There were no executable files found in this plugin314 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212217314

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin