78% smartvideo

Code Review | SmartVideo - Video Player and CDN

WordPress plugin SmartVideo - Video Player and CDN scored 78% from 54 tests.

About plugin

  • Plugin page: smartvideo
  • Plugin version: 2.0.25
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2018
  • Latest release: Jul 25, 2023
  • Number of updates: 70
  • Update frequency: every 28.2 days
  • Top authors: JDAdmin (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

3,000+ active / 64,252 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼4.57ms] Passed 4 tests

A check of server-side resources used by SmartVideo - Video Player and CDN
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2239.03 ▼0.20
Dashboard /wp-admin3.51 ▲0.2046.92 ▼1.11
Posts /wp-admin/edit.php3.62 ▲0.2647.27 ▼2.73
Add New Post /wp-admin/post-new.php6.10 ▲0.2185.67 ▼14.22
Media Library /wp-admin/upload.php3.43 ▲0.2040.62 ▲6.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 13 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SmartVideo - Video Player and CDN
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,650 ▼857.62 ▼6.6781.29 ▲79.5537.33 ▼0.48
Dashboard /wp-admin2,489 ▲2986.16 ▲1.27121.11 ▲16.4968.71 ▲24.18
Posts /wp-admin/edit.php2,390 ▲3012.95 ▲0.9153.12 ▲15.9056.58 ▲22.51
Add New Post /wp-admin/post-new.php6,708 ▲5,17421.16 ▼1.87853.51 ▲236.98196.49 ▲133.87
Media Library /wp-admin/upload.php1,679 ▲2915.21 ▲1.04101.56 ▼8.8683.78 ▲33.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 13 options
    • swarmify_toggle_youtube_cc
    • swarmify_toggle_layout
    • widget_recent-comments
    • swarmify_toggle_youtube
    • db_upgraded
    • widget_theysaidso_widget
    • swarmify_toggle_uploadacceleration
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smartvideo/page-builders/beaverbuilder/includes/frontend.css.php
    • > /wp-content/plugins/smartvideo/public/partials/swarmify-public-display.php
    • > /wp-content/plugins/smartvideo/admin/partials/swarmify-admin-display.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/smartvideo/admin/partials/dashboard-display.php:8
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/smartvideo/admin/partials/footer-display.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/smartvideo/page-builders/elementor/elementorsmartvideo.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smartvideo/public/partials/swarmify-widget-display.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smartvideo/admin/partials/add-video-lightbox-display.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smartvideo/public/class-swarmify-public.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/smartvideo/admin/partials/configuration-display.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/smartvideo/admin/partials/footer-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/smartvideo/admin/partials/settings-display.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/smartvideo/page-builders/beaverbuilder/class-beaverbuilder-smartvideo.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

smartvideo/SmartVideo.php 85% from 13 tests

"SmartVideo - Video Player and CDN" version 2.0.25's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to 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: Please rename the main PHP file in this plugin to the plugin slug ("smartvideo.php" instead of "SmartVideo.php")

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
Everything looks great! No dangerous files found in this plugin14,023 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code

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.36
Average class complexity11.62
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
▷ Static methods46.06%
▷ Public methods5786.36%
▷ Protected methods23.03%
▷ Private methods710.61%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/smartvideo_logo.png8.52KB4.28KB▼ 49.75%
admin/images/smartvideo_icon.png1.13KB0.47KB▼ 58.65%