78% jquery-masonry-image-gallery

Code Review | jQuery Masonry Image Gallery

WordPress plugin jQuery Masonry Image Gallery scored78%from 54 tests.

About plugin

  • Plugin page: jquery-masonry-im...
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: May 27, 2013
  • Latest release: Feb 28, 2017
  • Number of updates: 74
  • Update frequency: every 18.6 days
  • Top authors: phoenixMagoo (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

3,000+ active /70,810 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼3.69ms] Passed 4 tests

This is a short check of server-side resources used by jQuery Masonry Image Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0721.81 ▼17.63
Dashboard /wp-admin3.31 ▲0.0145.55 ▼1.54
Posts /wp-admin/edit.php3.36 ▲0.0147.84 ▲5.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.50 ▲5.63
Media Library /wp-admin/upload.php3.23 ▲0.0136.92 ▼1.20
JMIG Options /wp-admin/options-general.php?page=jmig_options3.1730.78

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for jQuery Masonry Image Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲16713.64 ▼0.786.88 ▲5.0637.50 ▼12.00
Dashboard /wp-admin2,210 ▲284.84 ▼0.05106.91 ▲2.8141.40 ▼2.33
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0438.45 ▲0.9934.78 ▼3.58
Add New Post /wp-admin/post-new.php1,550 ▲3018.40 ▼4.84607.66 ▼79.8367.37 ▲10.54
Media Library /wp-admin/upload.php1,392 ▲44.35 ▼0.0594.45 ▼18.6042.19 ▼8.17
JMIG Options /wp-admin/options-general.php?page=jmig_options8972.0327.5628.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=jmig_options
    • > Notice in wp-content/plugins/jquery-masonry-image-gallery/init.php+90
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/jquery-masonry-image-gallery/functions/three-dot-six.php
    • > /wp-content/plugins/jquery-masonry-image-gallery/functions/three-dot-five.php
    • > /wp-content/plugins/jquery-masonry-image-gallery/functions/three-dot-nine.php
    • > /wp-content/plugins/jquery-masonry-image-gallery/init.php

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 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: lazy load, gallery, jquery masonry, masonry

jquery-masonry-image-gallery/init.php 85% from 13 tests

"jQuery Masonry Image Gallery" version 3.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 201 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("jquery-masonry-image-gallery.php" instead of "init.php")

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
No dangerous file extensions were detected562 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP420126303
CSS5253188
JavaScript527671

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin