84% advanced-images-gallery-with-lightbox

Code Review | Advanced Images Gallery With Lightbox

WordPress plugin Advanced Images Gallery With Lightbox scored84%from 54 tests.

About plugin

  • Plugin page: advanced-images-g...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 21, 2022
  • Latest release: Sep 5, 2023
  • Number of updates: 13
  • Update frequency: every 31.7 days
  • Top authors: itpathsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /854 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.50ms] Passed 4 tests

A check of server-side resources used by Advanced Images Gallery With Lightbox
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.65 ▼3.59
Dashboard /wp-admin3.34 ▼0.0154.31 ▼13.42
Posts /wp-admin/edit.php3.39 ▲0.0351.11 ▼2.46
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.65 ▼22.54
Media Library /wp-admin/upload.php3.26 ▲0.0336.06 ▼2.41
Add New Gallery /wp-admin/post-new.php?post_type=aigwl_gallery3.4048.90
All Galleries /wp-admin/edit.php?post_type=aigwl_gallery3.3132.01

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Images Gallery With Lightbox
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲19113.59 ▼0.6912.74 ▲11.0944.50 ▲5.70
Dashboard /wp-admin2,224 ▲475.60 ▼0.0797.15 ▲4.9343.27 ▲2.31
Posts /wp-admin/edit.php2,129 ▲321.99 ▲0.0340.01 ▲1.2337.06 ▼3.75
Add New Post /wp-admin/post-new.php1,551 ▲2323.22 ▲0.08643.58 ▼65.6549.30 ▼15.65
Media Library /wp-admin/upload.php1,429 ▲324.18 ▲0.0595.53 ▼12.5641.58 ▼1.33
Add New Gallery /wp-admin/post-new.php?post_type=aigwl_gallery1,8213.6564.8881.75
All Galleries /wp-admin/edit.php?post_type=aigwl_gallery1,0981.9631.0428.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/hexagonal-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/masonary-gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Images_Gallery_With_Lightbox' not found in wp-content/plugins/advanced-images-gallery-with-lightbox/admin/partials/advanced-images-gallery-with-lightbox-admin-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/fullwidth-gallery.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_Images_Gallery_With_Lightbox' not found in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/advanced-images-gallery-with-lightbox-public-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/diamond-gallery.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/grid-gallery.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/advanced-images-gallery-with-lightbox/public/partials/slick-slider.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
6 plugin tags: slider, gallery with fancybox, advance images gallery with fancybox, gallery, image gallery...

advanced-images-gallery-with-lightbox/advanced-images-gallery-with-lightbox.php Passed 13 tests

The main PHP file in "Advanced Images Gallery With Lightbox" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
128 characters long description:
Advanced Images Gallery With Lightbox is the leading plugin for building responsive galleries with Fancybox & Different Layouts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,435 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS960351,444
PHP18172558700
JavaScript837119232
SVG10159

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 7.47MB with 5.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/fullwidth-gallery.png1,516.43KB288.95KB▼ 80.95%
admin/images/diamond-gallery.png1,275.22KB249.91KB▼ 80.40%
admin/images/grid-gallery.png1,921.63KB383.90KB▼ 80.02%
public/images/previous.png0.41KB0.34KB▼ 17.38%
admin/images/hexagonal-gallery.png630.49KB135.48KB▼ 78.51%