84% simple-masonry-gallery

Code Review | Simple Masonry Gallery

WordPress plugin Simple Masonry Gallery scored84%from 54 tests.

About plugin

  • Plugin page: simple-masonry-ga...
  • Plugin version: 7.05
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jun 9, 2014
  • Latest release: Nov 1, 2023
  • Number of updates: 124
  • Update frequency: every 27.7 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /31,948 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by Simple Masonry Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.86 ▲0.50
Dashboard /wp-admin3.32 ▲0.0145.52 ▼5.08
Posts /wp-admin/edit.php3.37 ▲0.0146.23 ▼0.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.03 ▼11.68
Media Library /wp-admin/upload.php3.24 ▲0.0133.04 ▼1.80
Simple Masonry Gallery /wp-admin/options-general.php?page=simplemasonry3.2130.94

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Masonry Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲12313.42 ▼0.9510.16 ▲8.3945.73 ▲3.24
Dashboard /wp-admin2,205 ▲315.61 ▲0.0791.15 ▼10.0237.61 ▼6.11
Posts /wp-admin/edit.php2,104 ▲71.94 ▼0.0239.27 ▲3.2334.93 ▲0.83
Add New Post /wp-admin/post-new.php6,199 ▲4,67218.88 ▼3.99948.23 ▲241.6857.21 ▼3.98
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0795.83 ▼12.7940.96 ▼4.15
Simple Masonry Gallery /wp-admin/options-general.php?page=simplemasonry9381.9822.4138.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-masonry-gallery/lib/class-simplemasonryadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-masonry-gallery/lib/class-simplemasonry.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-masonry-gallery/lib/class-simplemasonryadmin.php:37

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: block, gallery, jquery, masonry, images

simple-masonry-gallery/simplemasonry.php 92% from 13 tests

The principal PHP file in "Simple Masonry Gallery" v. 7.05 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-masonry-gallery.php" instead of "simplemasonry.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin685 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP489233511
JavaScript31618157
JSON10017
CSS13170

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.37
Average class complexity35.50
▷ Minimum class complexity14.00
▷ Maximum class complexity57.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin