78% photo-video-gallery-master

Code Review | Photo Video Gallery Master

WordPress plugin Photo Video Gallery Master scored 78% from 54 tests.

About plugin

  • Plugin page: photo-video-galle...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: Nov 20, 2015
  • Latest release: Nov 21, 2019
  • Number of updates: 50
  • Update frequency: every 29.3 days
  • Top authors: Webhuntinfotech (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

3,000+ active / 153,052 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼7.07ms] 75% from 4 tests

This is a short check of server-side resources used by Photo Video Gallery Master
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 636.05ms on /wp-admin/edit.php?post_type=pvgm_gallery&page=pvgm_recommend_page)
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.55 ▼5.56
Dashboard /wp-admin3.51 ▲0.2150.91 ▲1.00
Posts /wp-admin/edit.php3.61 ▲0.2550.75 ▲1.36
Add New Post /wp-admin/post-new.php6.09 ▲0.2185.43 ▼25.08
Media Library /wp-admin/upload.php3.44 ▲0.2139.69 ▲2.26
Recommendation /wp-admin/edit.php?post_type=pvgm_gallery&page=pvgm_recommend_page3.64636.05
Need Help? /wp-admin/edit.php?post_type=pvgm_gallery&page=pvgm_help_page3.4135.37
All Galleries /wp-admin/edit.php?post_type=pvgm_gallery3.4844.53
Add New Gallery /wp-admin/post-new.php?post_type=pvgm_gallery3.6149.56

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Photo Video Gallery Master
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.56 ▼0.875.60 ▲3.8242.40 ▲0.07
Dashboard /wp-admin2,246 ▲586.05 ▲0.20103.59 ▲4.6741.08 ▼4.58
Posts /wp-admin/edit.php2,130 ▲412.04 ▲0.0135.17 ▼1.9931.84 ▼4.07
Add New Post /wp-admin/post-new.php1,568 ▲4023.49 ▲5.16679.46 ▲60.4061.17 ▲10.51
Media Library /wp-admin/upload.php1,432 ▲474.20 ▲0.0095.56 ▼4.0941.78 ▼2.92
Recommendation /wp-admin/edit.php?post_type=pvgm_gallery&page=pvgm_recommend_page1,2592.0325.6629.11
Need Help? /wp-admin/edit.php?post_type=pvgm_gallery&page=pvgm_help_page1,44410.87269.3065.26
All Galleries /wp-admin/edit.php?post_type=pvgm_gallery1,1021.9429.9933.21
Add New Gallery /wp-admin/post-new.php?post_type=pvgm_gallery3,4803.8271.82202.21

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/photo-video-gallery-master/css/style_common.php
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: PVGM_Label_Text_Color in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 11
    • > PHP Notice
      Undefined variable: PVGM_Id in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 16
    • > PHP Notice
      Undefined variable: Label_Bg_Color in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 10
    • > PHP Notice
      Undefined variable: PVGM_Id in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 27
    • > PHP Notice
      Undefined variable: PVGM_Image_Border in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/photo-video-gallery-master/gallery-short-code.php:2
    • > PHP Notice
      Undefined variable: PVGM_Button_Text_Color in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 29
    • > PHP Notice
      Undefined variable: PVGM_Id in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 2
    • > PHP Notice
      Undefined variable: PVGM_Descp_Text_Color in wp-content/plugins/photo-video-gallery-master/css/style_common.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/photo-video-gallery-master/help-page.php:13

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (80 tag instead of maximum 10)
Please take inspiration from this readme.txt

photo-video-gallery-master/photo-video-gallery-master.php Passed 13 tests

The main PHP file in "Photo Video Gallery Master" ver. 1.5.3 adds more information about the plugin and also serves as the entry point for this plugin
134 characters long description:
Display your WordPress content like Photo, Video, Link, Image etc in Gallery format With CSS3 Hover Animation & Display With Lightbox.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin7,423 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS7713414,936
PHP6134601,527
JavaScript2611547
PO File1191205412
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/image-close-icon.png1.77KB1.19KB▼ 32.64%
lightbox/swipebox/img/icons.png0.71KB0.43KB▼ 39.64%