10% all-in-one-video-gallery

Code Review | All-in-One Video Gallery

WordPress plugin All-in-One Video Gallery scored10%from 54 tests.

About plugin

  • Plugin page: all-in-one-video-...
  • Plugin version: 3.5.2
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 19, 2017
  • Latest release: Sep 1, 2023
  • Number of updates: 120
  • Update frequency: every 17.4 days
  • Top authors: plugins360 (100%)

Code review

54 tests

User reviews

103 reviews

Install metrics

20,000+ active /503,612 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲5.88MB] [CPU: ▲33.94ms] 75% from 4 tests

An overview of server-side resources used by All-in-One Video Gallery
Please take the time to fix the following items
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.88MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.25 ▲5.7974.46 ▲32.08
Dashboard /wp-admin9.27 ▲5.9788.27 ▲41.41
Posts /wp-admin/edit.php9.27 ▲5.9187.54 ▲36.94
Add New Post /wp-admin/post-new.php11.73 ▲5.84124.59 ▲25.32
Media Library /wp-admin/upload.php9.27 ▲6.0479.11 ▲43.43
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius9.2773.08

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 373 new files
Database: no new tables, 28 new options
New WordPress options
widget_aiovg-widget-videos
fs_accounts
widget_recent-posts
aiovg_videos_settings
aiovg_featured_images_settings
aiovg_categories_settings
aiovg_images_settings
aiovg_general_settings
aiovg_api_settings
widget_aiovg-widget-video
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for All-in-One Video Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,088 ▲31715.41 ▲0.795.39 ▲3.4928.63 ▼16.72
Dashboard /wp-admin2,405 ▲2146.71 ▲1.84141.84 ▲39.1545.40 ▲1.54
Posts /wp-admin/edit.php2,311 ▲2193.63 ▲1.6053.10 ▲10.6532.60 ▼0.91
Add New Post /wp-admin/post-new.php6,234 ▲4,72019.26 ▲1.77944.65 ▲294.4237.41 ▼12.49
Media Library /wp-admin/upload.php1,447 ▲624.46 ▲0.3584.12 ▼26.4146.00 ▼1.72
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius1,3023.4139.8026.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/all-in-one-video-gallery/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • can_compress_scripts
    • widget_aiovg-widget-videos
    • widget_aiovg-widget-video
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_accounts
    • widget_aiovg-widget-search
    • fs_debug_mode
    • widget_aiovg-widget-categories
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/all-in-one-video-gallery/public/templates/categories-template-list.php
  • 41× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/all-in-one-video-gallery/admin/partials/issues.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/all-in-one-video-gallery/admin/partials/faq.php:15
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/all-in-one-video-gallery/admin/partials/category-fields.php on line 33
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/all-in-one-video-gallery/admin/partials/category-fields.php on line 13
    • > PHP Notice
      Undefined variable: player_settings in wp-content/plugins/all-in-one-video-gallery/public/templates/player-videojs.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/all-in-one-video-gallery/admin/partials/category-fields.php:66
    • > PHP Notice
      Undefined variable: post_type in wp-content/plugins/all-in-one-video-gallery/public/templates/player-videojs.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/all-in-one-video-gallery/admin/partials/video-tracks.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/all-in-one-video-gallery/admin/partials/video-submitbox.php:13
    • > PHP Notice
      Undefined variable: post_type in wp-content/plugins/all-in-one-video-gallery/public/templates/player-vidstack.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: vimeo gallery, live stream, video gallery, video player, youtube gallery

all-in-one-video-gallery/all-in-one-video-gallery.php 92% from 13 tests

Analyzing the main PHP file in "All-in-One Video Gallery" version 3.5.2
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 212 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected80,237 lines of code in 270 files:
LanguageFilesBlank linesComment linesLines of code
PHP18610,81420,56546,659
JSON100028,163
JavaScript437445073,564
CSS263511141,643
SVG200133
XML23074
HTML1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,087)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity71.25
▷ Minimum class complexity1.00
▷ Maximum class complexity3,087.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes81
▷ Abstract classes22.47%
▷ Concrete classes7997.53%
▷ Final classes00.00%
Methods1,480
▷ Static methods20213.65%
▷ Public methods1,07572.64%
▷ Protected methods171.15%
▷ Private methods38826.22%
Functions166
▷ Named functions16599.40%
▷ Anonymous functions10.60%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
public/assets/images/placeholder-image.png8.60KB2.67KB▼ 68.91%
admin/assets/images/logo.png1.18KB1.19KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/assets/images/play.png1.28KB1.57KB0.00%