78% video-link-gallery

Code Review | Video-Link-Gallery

WordPress plugin Video-Link-Gallery scored78%from 54 tests.

About plugin

  • Plugin page: video-link-gallery
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: Feb 25, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mbergann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.35MB] [CPU: ▼17.84ms] Passed 4 tests

Server-side resources used by Video-Link-Gallery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.415.27 ▼39.12
Dashboard /wp-admin3.32 ▲0.0146.35 ▼2.15
Posts /wp-admin/edit.php3.37 ▲0.0151.03 ▲1.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.62 ▼27.40
Media Library /wp-admin/upload.php3.24 ▲0.0135.67 ▼2.68

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

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

Browser metrics Passed 4 tests

Video-Link-Gallery: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.081.71 ▲0.0541.76 ▲2.01
Dashboard /wp-admin2,209 ▲214.84 ▼0.02107.31 ▼1.0137.85 ▼5.60
Posts /wp-admin/edit.php2,092 ▲62.02 ▼0.0240.21 ▲6.4534.76 ▼0.49
Add New Post /wp-admin/post-new.php1,533 ▲1922.89 ▲5.38693.38 ▲19.8453.92 ▼6.31
Media Library /wp-admin/upload.php1,388 ▲64.28 ▲0.0792.25 ▼8.1444.12 ▼1.57

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/video-link-gallery/index.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/video-link-gallery/tests/TestCase.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'TestCase' not found in wp-content/plugins/video-link-gallery/tests/ShortCodes/VideoGalleryTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Coderey\\VideoLinkGallery\\VideoProvider\\VideoProviderAbstract' not found in wp-content/plugins/video-link-gallery/src/VideoProvider/Youtube.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Coderey\\VideoLinkGallery\\VideoProvider\\VideoProviderInterface' not found in wp-content/plugins/video-link-gallery/src/VideoProvider/VideoProviderAbstract.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Coderey\\VideoLinkGallery\\Lightbox\\LightboxInterface' not found in wp-content/plugins/video-link-gallery/src/Lightbox/PhotoSwipe.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Coderey\\VideoLinkGallery\\VideoProvider\\VideoProviderAbstract' not found in wp-content/plugins/video-link-gallery/src/VideoProvider/Vimeo.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Coderey\\VideoLinkGallery\\VideoProvider\\VideoProviderAbstract' not found in wp-content/plugins/video-link-gallery/src/VideoProvider/Link.php:8

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: video-gallery, lightbox, vimeo, photoswipe, youtube

video-link-gallery/index.php 92% from 13 tests

The main PHP script in "Video-Link-Gallery" version 1.0.2 is automatically included on every request by WordPress
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 ("video-link-gallery.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected4,632 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59824223,446
CSS410393687
PHP1293201469
JSON11024
Markdown1305
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.10
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces3
Interfaces2
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods3780.43%
▷ Protected methods919.57%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
photoswipe/default-skin/default-skin.png0.53KB0.72KB0.00%