83% video-gallery-block

Code Review | Video Gallery Block - Display your videos as a gallery in a professional way

WordPress plugin Video Gallery Block - Display your videos as a gallery in a professional way scored83%from 54 tests.

About plugin

  • Plugin page: video-gallery-block
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 19
  • Update frequency: every 26.1 days
  • Top authors: charlescormier (89.47%)abuhayat (15.79%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /6,197 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.03MB] [CPU: ▼5.79ms] Passed 4 tests

An overview of server-side resources used by Video Gallery Block - Display your videos as a gallery in a professional way
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.74 ▼0.47
Dashboard /wp-admin3.34 ▼0.0045.96 ▼11.59
Posts /wp-admin/edit.php3.39 ▲0.0444.82 ▼0.67
Add New Post /wp-admin/post-new.php5.95 ▲0.0782.65 ▼10.42
Media Library /wp-admin/upload.php3.27 ▲0.0434.59 ▼0.33

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Video Gallery Block - Display your videos as a gallery in a professional way
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.25 ▼0.391.83 ▲0.3845.60 ▲5.70
Dashboard /wp-admin2,198 ▲215.62 ▼0.0094.54 ▲6.3842.15 ▲0.86
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0436.45 ▼0.0734.76 ▼5.37
Add New Post /wp-admin/post-new.php6,371 ▲4,84328.19 ▲5.07901.46 ▲253.3238.04 ▼17.07
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.01103.41 ▲4.5246.41 ▲5.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant VGB_PLUGIN_VERSION - assumed 'VGB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/video-gallery-block/dist/editor.asset.php on line 4
    • > PHP Warning
      Use of undefined constant VGB_PLUGIN_VERSION - assumed 'VGB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/video-gallery-block/dist/script.asset.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots do not have images: #1 (Video Gallery Settings), #2 (Video Gallery)
You can take inspiration from this readme.txt

video-gallery-block/index.php 85% from 13 tests

The primary PHP file in "Video Gallery Block - Display your videos as a gallery in a professional way" version 1.0.6 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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 ("video-gallery-block.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin289 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JSON200132
PO File1377092
PHP3161553
JavaScript51218
CSS4024

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin