90% image-gallery-block

Code Review | Image Gallery Block

WordPress plugin Image Gallery Block scored90%from 54 tests.

About plugin

  • Plugin page: image-gallery-block
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Aug 6, 2020
  • Latest release: Jun 7, 2023
  • Number of updates: 15
  • Update frequency: every 69.1 days
  • Top authors: wpdevteam (73.33%)alam789 (20%)re_enter_rupok (20%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /18,884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲1.44ms] Passed 4 tests

Server-side resources used by Image Gallery Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.52 ▼1.53
Dashboard /wp-admin3.46 ▲0.1648.89 ▲2.77
Posts /wp-admin/edit.php3.58 ▲0.2247.38 ▼0.13
Add New Post /wp-admin/post-new.php6.07 ▲0.1894.30 ▲4.66
Media Library /wp-admin/upload.php3.38 ▲0.1537.00 ▲4.68

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Image Gallery Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.051.68 ▲0.1343.13 ▲0.79
Dashboard /wp-admin2,195 ▲155.64 ▲0.0483.29 ▲0.6536.08 ▼3.18
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0238.14 ▲3.7031.69 ▼4.14
Add New Post /wp-admin/post-new.php1,664 ▲13817.78 ▼5.13656.96 ▲37.7433.60 ▼23.77
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.0493.78 ▼10.5940.60 ▼2.70

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: gutenberg blocks, lightbox, image grid, blocks, gallery...

image-gallery-block/image-gallery-block.php Passed 13 tests

Analyzing the main PHP file in "Image Gallery Block" version 1.3.2
65 characters long description:
Impress your audience with beautiful image gallery 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
There were no executable files found in this plugin2,613 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript812231,863
PHP11108166733
JSON10012
CSS5165

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity32.40
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods33
▷ Static methods1236.36%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected