99% photo-gallery-with-responsive

Code Review | WP Image Gallery

WordPress plugin WP Image Gallery scored 99% from 54 tests.

About plugin

  • Plugin page: photo-gallery-wit...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 5.9.2
  • First release: Feb 10, 2019
  • Latest release: Oct 11, 2020
  • Number of updates: 30
  • Update frequency: every 20.3 days
  • Top authors: pareshpachani007 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 673 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.41MB] [CPU: ▼290.41ms] Passed 4 tests

This is a short check of server-side resources used by WP Image Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3256.17 ▲6.43
Dashboard /wp-admin3.87 ▲0.4736.67 ▲2.32
Posts /wp-admin/edit.php4.10 ▲0.4640.60 ▲4.92
Add New Post /wp-admin/post-new.php7.35 ▲0.3896.96 ▼1,159.33
Media Library /wp-admin/upload.php3.76 ▲0.4627.93 ▼9.53
Works & Use /wp-admin/edit.php?post_type=photo_gallery&page=pgr-designs3.7631.82
Add Photo Gallery /wp-admin/post-new.php?post_type=photo_gallery4.1047.61
Category /wp-admin/edit-tags.php?taxonomy=photo_cat&post_type=photo_gallery3.7625.83
Photo Gallery /wp-admin/edit.php?post_type=photo_gallery3.9030.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP Image Gallery: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,928 ▲17016.24 ▲0.548.87 ▲2.112.13 ▼0.23
Dashboard /wp-admin2,939 ▲786.20 ▲0.03119.01 ▼14.93154.37 ▼8.39
Posts /wp-admin/edit.php2,735 ▲473.24 ▲0.0161.86 ▼0.34138.30 ▼1.43
Add New Post /wp-admin/post-new.php1,727 ▲6622.32 ▲5.98404.17 ▲1.78157.46 ▲9.02
Media Library /wp-admin/upload.php1,743 ▲485.54 ▲0.04143.00 ▲0.38190.46 ▲3.67
Works & Use /wp-admin/edit.php?post_type=photo_gallery&page=pgr-designs1,6074.2472.37135.73
Add Photo Gallery /wp-admin/post-new.php?post_type=photo_gallery3,10210.11192.75215.95
Category /wp-admin/edit-tags.php?taxonomy=photo_cat&post_type=photo_gallery1,6812.7755.68111.53
Photo Gallery /wp-admin/edit.php?post_type=photo_gallery1,7155.1574.64130.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
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
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (49 tag instead of maximum 10)
The official readme.txt is a good inspiration

photo-gallery-with-responsive/photo-gallery-with-responsive.php 92% from 13 tests

The entry point to "WP Image Gallery" version 1.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected4,579 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP17135372,575
JavaScript503421,168
SVG100685
CSS5017151

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.50
▷ Minimum class complexity12.00
▷ Maximum class complexity23.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png0.84KB0.85KB0.00%