84% tiny-video-gallery

Code Review | Tiny Video Gallery

WordPress plugin Tiny Video Gallery scored84%from 54 tests.

About plugin

  • Plugin page: tiny-video-gallery
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 18, 2022
  • Latest release: Feb 18, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: sabbirshouvo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.19ms] Passed 4 tests

A check of server-side resources used by Tiny Video Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0434.70 ▼4.56
Dashboard /wp-admin3.34 ▼0.0149.74 ▼11.60
Posts /wp-admin/edit.php3.39 ▲0.0443.78 ▼3.13
Add New Post /wp-admin/post-new.php6.02 ▲0.1383.55 ▼13.46
Media Library /wp-admin/upload.php3.26 ▲0.0337.27 ▲0.92
All Videos /wp-admin/edit.php?post_type=tiny_video_item3.3138.86
Add New /wp-admin/post-new.php?post_type=tiny_video_item3.3449.18
Category /wp-admin/edit-tags.php?taxonomy=tiny_video_category&post_type=tiny_video_item3.2638.84

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Tiny Video Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.41 ▼0.958.59 ▲7.0739.94 ▲2.19
Dashboard /wp-admin2,232 ▲585.64 ▲0.0084.38 ▼8.0935.81 ▼1.01
Posts /wp-admin/edit.php2,134 ▲372.00 ▲0.0136.85 ▼1.2529.52 ▼7.60
Add New Post /wp-admin/post-new.php1,555 ▲2923.44 ▲0.19654.48 ▲1.8862.53 ▲2.75
Media Library /wp-admin/upload.php1,431 ▲284.26 ▲0.0796.26 ▼3.7340.82 ▼1.83
All Videos /wp-admin/edit.php?post_type=tiny_video_item1,0851.9133.6628.13
Add New /wp-admin/post-new.php?post_type=tiny_video_item1,7873.7579.5036.85
Category /wp-admin/edit-tags.php?taxonomy=tiny_video_category&post_type=tiny_video_item1,2832.2630.9233.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiny-video-gallery/inc/widgets/vc.php:4
    • > PHP Warning
      require(TPVG_DIR_PATHinc/widgets/generic.php): failed to open stream: No such file or directory in wp-content/plugins/tiny-video-gallery/inc/widgets.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiny-video-gallery/inc/cpt.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tiny-video-gallery/inc/widgets/generic.php:22
    • > PHP Fatal error
      require(): Failed opening required 'TPVG_DIR_PATHinc/widgets/generic.php' (include_path='.:/usr/share/php') in wp-content/plugins/tiny-video-gallery/inc/widgets.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'TinyVideoGallery\\Widgets\\Widget_Base' not found in wp-content/plugins/tiny-video-gallery/inc/widgets/elementor.php:5
    • > PHP Warning
      Use of undefined constant TPVG_DIR_PATH - assumed 'TPVG_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tiny-video-gallery/inc/widgets.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiny-video-gallery/inc/metabox.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tiny-video-gallery/inc/taxonomy.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: video gallery, elementor video gallery

tiny-video-gallery/tiny-video-gallery.php 92% from 13 tests

"Tiny Video Gallery" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin940 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP885122524
JavaScript21119237
CSS2250179

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods29.09%
▷ Public methods1881.82%
▷ Protected methods29.09%
▷ Private methods29.09%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/static/vc_icon.png7.60KB3.37KB▼ 55.62%