89% image-video-gallery

Code Review | Image Video Gallery

WordPress plugin Image Video Gallery scored89%from 54 tests.

About plugin

  • Plugin page: image-video-gallery
  • Plugin version: 1.11.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9+
  • WordPress version: 6.3.1
  • First release: Jul 24, 2017
  • Latest release: Nov 25, 2017
  • Number of updates: 20
  • Update frequency: every 14.9 days
  • Top authors: amit_ratio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /565 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼6.18ms] Passed 4 tests

An overview of server-side resources used by Image Video Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0144.08 ▲0.62
Dashboard /wp-admin3.32 ▲0.0149.61 ▼0.00
Posts /wp-admin/edit.php3.37 ▲0.0147.86 ▲4.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.55 ▼25.93
Media Library /wp-admin/upload.php3.24 ▲0.0133.41 ▲0.60

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Image Video Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲19113.64 ▼0.7211.76 ▲9.4044.41 ▼12.79
Dashboard /wp-admin2,203 ▲155.91 ▲1.04110.48 ▲0.1943.06 ▲6.29
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0540.66 ▼2.3331.66 ▼5.62
Add New Post /wp-admin/post-new.php1,538 ▲2422.81 ▲5.31645.88 ▲0.0553.57 ▲2.88
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.1699.78 ▼0.5143.54 ▲0.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === image-video-gallery === )
  • Tested up to: Version format is invalid
Please take inspiration from this readme.txt

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

The main PHP file in "Image Video Gallery" ver. 1.11.17 adds more information about the plugin and also serves as the entry point for this plugin
40 characters long description:
Add image and video gallery meta fields.

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
Good job! No executable or dangerous file extensions detected760 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP44546302
CSS4324257
JavaScript32735184
Markdown14017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.00
▷ Minimum class complexity12.00
▷ Maximum class complexity14.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/controls.png1.59KB1.67KB0.00%
assets/css/images/border.png0.07KB0.10KB0.00%
assets/css/images/close.png0.27KB0.29KB0.00%
assets/css/images/prev.png1.33KB1.59KB0.00%
assets/css/images/overlay.png0.11KB0.15KB0.00%