72% gt3-photo-video-gallery

Code Review | Photo Gallery - GT3 Image Gallery & Gutenberg Block Gallery

WordPress plugin Photo Gallery - GT3 Image Gallery & Gutenberg Block Gallery scored72%from 54 tests.

About plugin

  • Plugin page: gt3-photo-video-g...
  • Plugin version: 2.7.7.18
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 6, 2016
  • Latest release: Aug 7, 2023
  • Number of updates: 165
  • Update frequency: every 15.9 days
  • Top authors: gt3themes (100%)

Code review

54 tests

User reviews

127 reviews

Install metrics

20,000+ active /399,847 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.41MB] [CPU: ▲12.48ms] Passed 4 tests

This is a short check of server-side resources used by Photo Gallery - GT3 Image Gallery & Gutenberg Block Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.89 ▲1.4356.26 ▲13.66
Dashboard /wp-admin4.72 ▲1.4164.75 ▲18.32
Posts /wp-admin/edit.php4.77 ▲1.4163.24 ▲10.48
Add New Post /wp-admin/post-new.php7.46 ▲1.57106.92 ▲12.03
Media Library /wp-admin/upload.php4.64 ▲1.4153.73 ▲13.73
Add New /wp-admin/post-new.php?post_type=gt3_gallery7.48105.19
All Galleries /wp-admin/edit.php?post_type=gt3_gallery4.6867.24
Categories /wp-admin/edit-tags.php?taxonomy=gt3_gallery_category&post_type=gt3_gallery4.6462.00
Settings /wp-admin/admin.php?page=gt3_gallery-settings4.6251.85

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 154 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
gt3_rate_date
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Photo Gallery - GT3 Image Gallery & Gutenberg Block Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲18613.24 ▼1.322.27 ▲0.2038.61 ▼6.36
Dashboard /wp-admin2,284 ▲1295.12 ▼0.51104.30 ▼3.47132.12 ▲91.49
Posts /wp-admin/edit.php2,168 ▲762.37 ▲0.3845.10 ▲4.4538.76 ▲1.13
Add New Post /wp-admin/post-new.php6,442 ▲4,90830.21 ▲7.071,062.81 ▲412.9642.89 ▼7.57
Media Library /wp-admin/upload.php1,455 ▲674.51 ▲0.37108.31 ▲0.5579.81 ▲35.15
Add New /wp-admin/post-new.php?post_type=gt3_gallery10,89626.051,109.0333.05
All Galleries /wp-admin/edit.php?post_type=gt3_gallery1,1842.2938.5833.17
Categories /wp-admin/edit-tags.php?taxonomy=gt3_gallery_category&post_type=gt3_gallery1,3662.2241.3243.05
Settings /wp-admin/admin.php?page=gt3_gallery-settings1,52611.19188.63165.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • gt3_rate_date
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% 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)
Almost there, just fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gt3_gallery-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gt3_gallery-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 39 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gt3_gallery-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gt3_gallery-settings
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% 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 take a closer look at the following
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gt3-photo-video-gallery/rate.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3input_color.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3select.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3input_onoff.php:8
    • > PHP Warning
      Use of undefined constant GT3PG_LITE_IMG_URL - assumed 'GT3PG_LITE_IMG_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gt3-photo-video-gallery/core/pages/premium_themes.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3_el.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3panel_input_color.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3input.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3options.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'gt3classStd' not found in wp-content/plugins/gt3-photo-video-gallery/core/class/gt3attr.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=gt3_gallery-settings
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a+1:627
    wp.compose.withGlobalEvents is deprecated since version 5.7. Please use useEffect instead.

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Screenshots: Please a description for screenshot #4 in gt3-photo-video-gallery/assets to your readme.txt
You can take inspiration from this readme.txt

gt3-photo-video-gallery/gt3-photo-video-gallery.php 85% from 13 tests

The main file in "Photo Gallery - GT3 Image Gallery & Gutenberg Block Gallery" v. 2.7.7.18 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 162 characters long)

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 plugin11,137 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP761,4984018,697
CSS10209421,177
JavaScript17972271,154
SVG702109

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity20.70
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces8
Interfaces0
Traits8
Classes42
▷ Abstract classes49.52%
▷ Concrete classes3890.48%
▷ Final classes00.00%
Methods358
▷ Static methods4111.45%
▷ Public methods26072.63%
▷ Protected methods7220.11%
▷ Private methods267.26%
Functions83
▷ Named functions3339.76%
▷ Anonymous functions5060.24%
Constants30
▷ Global constants1963.33%
▷ Class constants1136.67%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
21 PNG files occupy 0.21MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/img/edit.4c0ce7b7.png0.73KB0.69KB▼ 4.44%
core/cpt/gallery/static/img/edit.png0.61KB0.65KB0.00%
dist/img/edit.3036e8e0.png0.61KB0.65KB0.00%
dist/img/lightbox_sprite.773491ce.png19.70KB9.54KB▼ 51.57%
dist/img/support.png1.35KB0.42KB▼ 68.96%