74% smart-grid-gallery

Code Review | Video Gallery - Vimeo and YouTube Gallery

WordPress plugin Video Gallery - Vimeo and YouTube Gallery scored 74% from 54 tests.

About plugin

  • Plugin page: smart-grid-gallery
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2019
  • Latest release: Nov 11, 2021
  • Number of updates: 20
  • Update frequency: every 39.8 days
  • Top authors: origincode (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

10,000+ active / 104,350 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.20MB] [CPU: ▼11.90ms] Passed 4 tests

Analyzing server-side resources used by Video Gallery - Vimeo and YouTube Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.45 ▼2.04
Dashboard /wp-admin3.37 ▲0.0746.90 ▼3.04
Posts /wp-admin/edit.php3.48 ▲0.1345.64 ▼2.43
Add New Post /wp-admin/post-new.php4.88 ▼1.0057.60 ▼40.09
Media Library /wp-admin/upload.php3.30 ▲0.0735.57 ▲2.67
Video Galleries /wp-admin/admin.php?page=video_galleries_origincode_video_gallery3.3640.29
Advanced Features PRO /wp-admin/admin.php?page=Options_video_gallery_styles3.3537.24
Lightbox Options /wp-admin/admin.php?page=Options_video_gallery_lightbox_styles3.4240.38

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 221 new files
Database: 2 new tables, 13 new options
New tables
wp_origincode_videogallery_galleries
wp_origincode_videoorigincode_gallery_videos
New WordPress options
widget_origincode_origincode_gallery_video_widget
origincode_gallery_video_disable_right_click
origincode_gallery_video_lightbox_loop_new
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
origincode_gallery_video_lightbox_overlayClose_new
origincode_gallery_video_lightbox_speed_new
origincode_gallery_video_lightbox_type
origincode_gallery_video_lightbox_lightboxView
...

Browser metrics Passed 4 tests

Video Gallery - Vimeo and YouTube Gallery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,305 ▲57013.25 ▼1.121.83 ▲0.1340.68 ▼1.22
Dashboard /wp-admin2,686 ▲5044.88 ▼0.9899.86 ▼8.4778.12 ▲37.76
Posts /wp-admin/edit.php2,570 ▲4811.99 ▼0.0236.08 ▼0.3531.09 ▼0.68
Add New Post /wp-admin/post-new.php6,911 ▲5,39723.44 ▲5.84901.87 ▲220.2843.07 ▼13.90
Media Library /wp-admin/upload.php1,869 ▲4784.22 ▼0.11102.77 ▲7.9587.55 ▲44.47
Video Galleries /wp-admin/admin.php?page=video_galleries_origincode_video_gallery1,6073.2950.5473.72
Advanced Features PRO /wp-admin/admin.php?page=Options_video_gallery_styles1,7723.2147.2885.19
Lightbox Options /wp-admin/admin.php?page=Options_video_gallery_lightbox_styles2,1963.2642.6069.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_origincode_videoorigincode_gallery_videos
    • wp_origincode_videogallery_galleries
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_theysaidso_widget
    • origincode_gallery_video_lightbox_overlayClose_new
    • origincode_gallery_video_disable_right_click
    • origincode_gallery_video_lightbox_speed_new
    • origincode_gallery_video_lightbox_type
    • origincode_gallery_video_lightbox_lightboxView
    • widget_recent-comments
    • origincode_gallery_video_lightbox_loop_new
    • widget_origincode_origincode_gallery_video_widget
    • theysaidso_admin_options
    • ...

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
Please fix the following items
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/smart-grid-gallery/templates/front-end/content-popup/content-popup-view.css.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/smart-grid-gallery/templates/front-end/justified/justified-view.css.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/smart-grid-gallery/templates/front-end/blog-style-gallery/blog-style-gallery-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/smart-grid-gallery/templates/admin/popup-content-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/smart-grid-gallery/templates/front-end/playlist/playlist-view.css.php:8
    • > PHP Notice
      Undefined variable: has_youtube in wp-content/plugins/smart-grid-gallery/templates/front-end/slider/slider-view.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/smart-grid-gallery/templates/front-end/content-popup/content-popup-view.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/smart-grid-gallery/templates/front-end/content-slider/content-slider-view.css.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/smart-grid-gallery/templates/front-end/blog-style-gallery/blog-style-gallery-view.css.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/smart-grid-gallery/templates/front-end/lightbox-gallery/lightbox-gallery-view.css.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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: video gallery plugin, wordpress video gallery, video gallery, wp video gallery, youtube gallery

smart-grid-gallery/smart-video-gallery.php 85% from 13 tests

"Video Gallery - Vimeo and YouTube Gallery" version 1.1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smart-grid-gallery.php" instead of "smart-video-gallery.php")
  • Domain Path: The domain path folder does not exist ("/languages/")

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 plugin24,994 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP405635647,870
JavaScript269792686,103
CSS196361725,949
SVG1102,569
Sass1323241,256
LESS1323331,247

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity24.46
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods74
▷ Static methods912.16%
▷ Public methods6587.84%
▷ Protected methods22.70%
▷ Private methods79.46%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
85 PNG files occupy 0.41MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/4/border1.png1.03KB0.82KB▼ 20.34%
assets/images/5/controls.png1.99KB2.04KB0.00%
assets/images/admin_images/shape-26.png0.17KB0.17KB▼ 0.58%
assets/images/arrows/arrows.red.circle.png3.46KB0.51KB▼ 85.23%
assets/images/admin_images/05-bottom-line.png0.40KB0.53KB0.00%