72% new-video-gallery

Code Review | Video Gallery - Api Gallery, YouTube and Vimeo, Link Gallery

WordPress plugin Video Gallery - Api Gallery, YouTube and Vimeo, Link Gallery scored72%from 54 tests.

About plugin

  • Plugin page: new-video-gallery
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: Oct 20, 2023
  • Number of updates: 127
  • Update frequency: every 20.3 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /85,677 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.49MB] [CPU: ▼3.96ms] 75% from 4 tests

This is a short check of server-side resources used by Video Gallery - Api Gallery, YouTube and Vimeo, Link Gallery
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 696.93ms on /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page)
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5243.30 ▲3.15
Dashboard /wp-admin3.85 ▲0.5052.24 ▼9.43
Posts /wp-admin/edit.php3.90 ▲0.5448.02 ▲3.17
Add New Post /wp-admin/post-new.php6.37 ▲0.4884.11 ▼11.60
Media Library /wp-admin/upload.php3.71 ▲0.4837.82 ▲2.04
All Video Gallery /wp-admin/edit.php?post_type=video_gallery3.7135.51
Our Theme /wp-admin/edit.php?post_type=video_gallery&page=sr-theme-page3.6834.48
Add Video Gallery /wp-admin/post-new.php?post_type=video_gallery3.9845.78
Featured Plugin /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page3.90696.93
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.9234.19

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Video Gallery - Api Gallery, YouTube and Vimeo, Link Gallery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲17313.51 ▼0.878.45 ▲6.7141.66 ▲2.07
Dashboard /wp-admin2,268 ▲885.56 ▼0.0986.54 ▲1.2541.09 ▼3.81
Posts /wp-admin/edit.php2,164 ▲672.06 ▲0.0335.00 ▲1.1737.70 ▲4.07
Add New Post /wp-admin/post-new.php1,589 ▲6323.32 ▲0.29664.43 ▲2.4261.57 ▲8.16
Media Library /wp-admin/upload.php1,481 ▲784.23 ▲0.0696.44 ▼4.8047.75 ▲1.79
All Video Gallery /wp-admin/edit.php?post_type=video_gallery1,1632.1438.4236.12
Our Theme /wp-admin/edit.php?post_type=video_gallery&page=sr-theme-page1,0092.1925.3372.19
Add Video Gallery /wp-admin/post-new.php?post_type=video_gallery2,6543.9275.14137.37
Featured Plugin /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page3,3831.8227.40210.85
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0802.0522.8831.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=video_gallery
    • > Notice in wp-content/plugins/new-video-gallery/new-video-gallery.php+124
    Undefined variable: columns
    • > GET request to /wp-admin/edit.php?post_type=video_gallery
    • > Notice in wp-content/plugins/new-video-gallery/new-video-gallery.php+124
    Trying to access array offset on value of type null

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
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/new-video-gallery/include/video-gallery-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/new-video-gallery/include/shortcode.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/new-video-gallery/class-tgm-plugin-activation.php:2129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/new-video-gallery/featured-plugins/featured-plugins.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/new-video-gallery/our-theme/awp-theme.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-theme-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/js/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/css/bootstrap.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/js/bootstrap.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/js/featured-plugins/acl-media-upload-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/js/featured-plugins/bootstrap.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/featured-plugins/fonts/bootstrap/glyphicons-halflings-regular-2.html - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=video_gallery&page=sr-feature-plugin-page
    • > Network (severe)
    wp-content/plugins/new-video-gallery/featured-plugins/fonts/bootstrap/glyphicons-halflings-regular-3.html - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: youtube gallery, vimeo gallery, youtube api gallery, gallery, video gallery

new-video-gallery/new-video-gallery.php Passed 13 tests

"Video Gallery - Api Gallery, YouTube and Vimeo, Link Gallery" version 1.5.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
56 characters long description:
Create YouTube Vimeo Video Galleries Into WordPress Blog

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
There were no executable files found in this plugin43,419 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS162,14342328,752
JavaScript111,4031,2617,375
SVG3003,644
PHP86231,7293,445
PO File18999203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity43.50
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods118
▷ Static methods54.24%
▷ Public methods9378.81%
▷ Protected methods2521.19%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
our-theme/img/aneeq-premium.png165.42KB57.84KB▼ 65.04%
assets/img/p-vimeo.png2.50KB1.01KB▼ 59.52%
assets/img/p-youtube.png2.25KB1.03KB▼ 54.22%
assets/css/new-slide.png2.54KB1.19KB▼ 53.21%