83% easy-support-videos

Code Review | Easy Support Videos - Embed videos in the admin

WordPress plugin Easy Support Videos - Embed videos in the admin scored83%from 54 tests.

About plugin

  • Plugin page: easy-support-videos
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2016
  • Latest release: Jun 20, 2022
  • Number of updates: 13
  • Update frequency: every 159.2 days
  • Top authors: slocumstudio (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active /7,656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.66ms] Passed 4 tests

A check of server-side resources used by Easy Support Videos - Embed videos in the admin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.42 ▼2.09
Dashboard /wp-admin3.54 ▲0.2445.18 ▼6.84
Posts /wp-admin/edit.php3.54 ▲0.1949.95 ▲4.16
Add New Post /wp-admin/post-new.php6.01 ▲0.1284.32 ▼1.88
Media Library /wp-admin/upload.php3.35 ▲0.1241.32 ▲6.14

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
easy_support_videos
widget_recent-comments
can_compress_scripts
easy_support_videos_version
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Support Videos - Embed videos in the admin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,861 ▼87410.76 ▼3.641.56 ▼0.3329.28 ▼31.88
Dashboard /wp-admin2,220 ▲325.86 ▼0.03109.25 ▲2.0645.11 ▼0.58
Posts /wp-admin/edit.php2,115 ▲261.99 ▼0.0635.93 ▼1.5531.95 ▼4.01
Add New Post /wp-admin/post-new.php1,550 ▲3123.03 ▼0.32630.28 ▼48.8033.41 ▼23.84
Media Library /wp-admin/upload.php1,414 ▲264.29 ▲0.0994.42 ▼6.0142.79 ▼4.70

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: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • easy_support_videos_version
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-contextual-videos-section.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Support_Videos_Options' not found in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-contextual-videos-global-video-enabled-field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_settings_sections() in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-contextual-videos-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Support_Videos_Options' not found in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-contextual-videos-enabled-field.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Support_Videos_Options' not found in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-contextual-videos-roles-read-field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-page-title.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Support_Videos_Options' not found in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-uninstall-data-field.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Support_Videos_Options' not found in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-sidebar-item-message.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Support_Videos_Options' not found in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-options-roles-edit-field.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/easy-support-videos/includes/admin/views/html-easy-support-videos-insert-video.php:2

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

readme.txt 88% 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:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Add descriptions for screenshots #3, #4, #5, #6, #7 in easy-support-videos/assets to your readme.txt
The official readme.txt is a good inspiration

easy-support-videos/easy-support-videos.php 92% from 13 tests

The principal PHP file in "Easy Support Videos - Embed videos in the admin" v. 2.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 166 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,704 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP331,2982,5053,114
CSS717489808
JavaScript8189499782

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity48.75
▷ Minimum class complexity2.00
▷ Maximum class complexity380.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes12100.00%
Methods172
▷ Static methods5934.30%
▷ Public methods16595.93%
▷ Protected methods00.00%
▷ Private methods74.07%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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