56% gallery-photo-video

Code Review | Gallery Photo Video

WordPress plugin Gallery Photo Video scored56%from 54 tests.

About plugin

  • Plugin page: gallery-photo-video
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2016
  • Latest release: Jun 21, 2023
  • Number of updates: 79
  • Update frequency: every 33.7 days
  • Top authors: webdzier (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

300+ active /24,098 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.84MB] [CPU: ▼32.35ms] Passed 4 tests

This is a short check of server-side resources used by Gallery Photo Video
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.41 ▼6.21
Dashboard /wp-admin3.10 ▼0.2023.14 ▼26.09
Posts /wp-admin/edit.php3.11 ▼0.2526.69 ▼22.21
Add New Post /wp-admin/post-new.php3.10 ▼2.7824.80 ▼69.94
Media Library /wp-admin/upload.php3.10 ▼0.1223.52 ▼11.17
Our Products /wp-admin/edit.php?post_type=gpv_gallery&page=ourproduct-list3.1123.29
All Galleres /wp-admin/edit.php?post_type=gpv_gallery3.1124.50
Add New Gallery /wp-admin/post-new.php?post_type=gpv_gallery3.1122.06

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
GPV_Default_Setting
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gallery Photo Video
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.29 ▼0.954.32 ▲2.5243.78 ▲0.80
Dashboard /wp-admin2,252 ▲674.92 ▲0.0393.65 ▼21.1770.37 ▲21.88
Posts /wp-admin/edit.php2,132 ▲432.02 ▼0.0038.37 ▲3.6135.74 ▲2.98
Add New Post /wp-admin/post-new.php1,553 ▲3923.39 ▲5.64691.02 ▲34.4863.26 ▲13.21
Media Library /wp-admin/upload.php1,422 ▲344.30 ▲0.0997.60 ▼5.5171.36 ▲26.42
Our Products /wp-admin/edit.php?post_type=gpv_gallery&page=ourproduct-list1,0983.3145.0383.53
All Galleres /wp-admin/edit.php?post_type=gpv_gallery1,3093.6346.7389.40
Add New Gallery /wp-admin/post-new.php?post_type=gpv_gallery3,3475.10106.4294.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gpv_gallery
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gallery-photo-video/include/css_gallery_1.php
  • 77× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/gallery-photo-video/include/GPV-setting.php:3
    • > PHP Notice
      Undefined variable: data_setting in wp-content/plugins/gallery-photo-video/include/css_gallery_1.php on line 73
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gallery-photo-video/include/css_gallery_1.php on line 35
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/gallery-photo-video/include/GPV-addimages.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/gallery-photo-video/include/our_product.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gallery-photo-video/include/shortcode.php:2
    • > PHP Notice
      Undefined variable: data_setting in wp-content/plugins/gallery-photo-video/include/css_gallery_1.php on line 48
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/gallery-photo-video/include/css_gallery_1.php on line 72
    • > PHP Notice
      Undefined variable: data_setting in wp-content/plugins/gallery-photo-video/include/css_gallery_1.php on line 65
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gallery-photo-video/include/css_gallery_1.php on line 67

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=gpv_gallery&page=ourproduct-list
    • > Network (severe)
    wp-content/themes/twentytwentyone/css/bootstrap.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 61 tag instead of maximum 10
You can look at the official readme.txt

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

Analyzing the main PHP file in "Gallery Photo Video" version 2.8
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

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
Everything looks great! No dangerous files found in this plugin4,400 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS6128312,248
PHP8120391,301
JavaScript5193110850
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
9 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png1.38KB1.14KB▼ 17.44%
lightbox/img/icons.png0.71KB0.43KB▼ 39.64%
images/gallery-1.png38.25KB9.95KB▼ 73.99%
images/gallery-2.png26.92KB8.08KB▼ 69.99%
images/GPVbutton.png1.54KB1.33KB▼ 13.59%