84% paw-masonry-gallery

Code Review | Torque Masonry Gallery for Divi

WordPress plugin Torque Masonry Gallery for Divi scored84%from 54 tests.

About plugin

  • Plugin page: paw-masonry-gallery
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 29, 2022
  • Latest release: Oct 21, 2023
  • Number of updates: 14
  • Update frequency: every 25.5 days
  • Top authors: badhonrocks (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /3,566 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Torque Masonry Gallery for Divi
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0422.77 ▼17.67
Dashboard /wp-admin3.35 ▼0.0043.68 ▼15.17
Posts /wp-admin/edit.php3.40 ▲0.0445.37 ▼1.36
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.86 ▲4.87
Media Library /wp-admin/upload.php3.27 ▲0.0435.06 ▲1.97

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 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-comments
widget_recent-posts

Browser metrics Passed 4 tests

Torque Masonry Gallery for Divi: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼29214.49 ▼0.130.45 ▼1.2416.68 ▼25.59
Dashboard /wp-admin2,189 ▲125.64 ▼0.0292.69 ▼9.2342.53 ▲0.72
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0339.32 ▲2.8435.94 ▲2.14
Add New Post /wp-admin/post-new.php1,537 ▲918.14 ▼5.08594.55 ▼82.0378.35 ▲25.62
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.06101.98 ▼6.8046.43 ▼2.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: image_data in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/paw-masonry-gallery/includes/views/item.php:10
    • > PHP Notice
      Undefined variable: image_data in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 2
    • > PHP Notice
      Undefined variable: image_data in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 2
    • > PHP Notice
      Undefined variable: image_data in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 6
    • > PHP Notice
      Undefined variable: image_data in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TorqueMasonryGallery\\esc_attr() in wp-content/plugins/paw-masonry-gallery/includes/helper.php:26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/paw-masonry-gallery/includes/views/item.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: divi module, gallery, divi, masonry, builder

paw-masonry-gallery/paw-masonry-gallery.php Passed 13 tests

"Torque Masonry Gallery for Divi" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
67 characters long description:
The fastest and easiest way to create a responsive masonry gallery.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected4,884 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4383,348
PHP616215786
CSS300738
JSON1006
SVG1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.75
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods731.82%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
PNG images were not found in this plugin