84% snap-video-gallery

Code Review | Snap Video Gallery

WordPress plugin Snap Video Gallery scored84%from 54 tests.

About plugin

  • Plugin page: snap-video-gallery
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 22, 2023
  • Latest release: May 22, 2023
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: sitesteward (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /378 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▲1.79ms] Passed 4 tests

A check of server-side resources used by Snap Video Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1055.59 ▲7.69
Dashboard /wp-admin3.40 ▲0.0950.59 ▼4.44
Posts /wp-admin/edit.php3.51 ▲0.1549.93 ▲3.92
Add New Post /wp-admin/post-new.php5.98 ▲0.0999.71 ▲9.97
Media Library /wp-admin/upload.php3.32 ▲0.0937.22 ▼0.02
Settings /wp-admin/admin.php?page=snap-video-gallery-settings3.3034.64
Videos /wp-admin/edit.php?post_type=snap-video3.3637.26

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Snap Video Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8813.24 ▼1.132.36 ▲0.4958.14 ▲16.19
Dashboard /wp-admin2,251 ▲484.85 ▼0.10108.52 ▼8.8740.45 ▼4.08
Posts /wp-admin/edit.php2,127 ▲272.00 ▼0.0541.00 ▲7.3035.04 ▲0.44
Add New Post /wp-admin/post-new.php6,387 ▲4,84227.80 ▲4.60858.50 ▲185.7369.91 ▲13.39
Media Library /wp-admin/upload.php1,427 ▲274.15 ▼0.0799.69 ▼13.7545.90 ▼2.29
Settings /wp-admin/admin.php?page=snap-video-gallery-settings8542.1525.6031.45
Videos /wp-admin/edit.php?post_type=snap-video1,0881.9832.2329.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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

SRP 50% 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 take a closer look at the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snap-video-gallery/templates/modal.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/snap-video-gallery/templates/admin/video-url-meta.php:13
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/snap-video-gallery/templates/gallery.php on line 9
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/snap-video-gallery/templates/video.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/snap-video-gallery/templates/modal.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snap-video-gallery/templates/video.php on line 9
    • > PHP Notice
      Undefined variable: display in wp-content/plugins/snap-video-gallery/templates/modal.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/snap-video-gallery/templates/player.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/snap-video-gallery/templates/player.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/snap-video-gallery/templates/video.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: gallery, vimeo, video, videos, youtube...

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

The main PHP file in "Snap Video Gallery" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
93 characters long description:
Easy-to-use video gallery that enables you to insert a gallery of videos into a page or post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin829 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP2017740673
CSS113082
JavaScript214074

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.36
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods59
▷ Static methods813.56%
▷ Public methods4983.05%
▷ Protected methods1016.95%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin