67% wptools-masonry-gallery-posts-for-divi

Code Review | WPTools Masonry Gallery & Posts For Divi

WordPress plugin WPTools Masonry Gallery & Posts For Divi scored67%from 54 tests.

About plugin

  • Plugin page: wptools-masonry-g...
  • Plugin version: 3.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2021
  • Latest release: Aug 24, 2023
  • Number of updates: 16
  • Update frequency: every 48.6 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /6,473 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲5.07MB] [CPU: ▲23.43ms] 50% from 4 tests

An overview of server-side resources used by WPTools Masonry Gallery & Posts For Divi
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,879.61ms on /wp-admin/admin.php?page=wptools-masonry-gallery-posts-for-divi)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.07MB on /wp-admin/edit-tags.php?taxonomy=wpt-attachment-cat&post_type=attachment)
PageMemory (MB)CPU Time (ms)
Home /8.92 ▲5.4672.58 ▲31.01
Dashboard /wp-admin8.94 ▲5.6473.11 ▲18.96
Posts /wp-admin/edit.php8.94 ▲5.5882.86 ▲27.72
Add New Post /wp-admin/post-new.php9.50 ▲3.62123.27 ▲16.03
Media Library /wp-admin/upload.php8.94 ▲5.7178.82 ▲40.61
WPTools Masonry Gallery & Posts For Divi /wp-admin/admin.php?page=wptools-masonry-gallery-posts-for-divi8.941,879.61
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9459.38
Categories /wp-admin/edit-tags.php?taxonomy=wpt-attachment-cat&post_type=attachment8.9459.51

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 257 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
fs_accounts
fs_debug_mode
db_upgraded
fs_active_plugins
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WPTools Masonry Gallery & Posts For Divi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲5114.34 ▼0.171.99 ▼0.1734.41 ▼8.65
Dashboard /wp-admin2,219 ▲425.57 ▼0.0792.57 ▲2.8546.32 ▲3.47
Posts /wp-admin/edit.php2,125 ▲222.02 ▲0.0842.74 ▲1.8539.94 ▲1.72
Add New Post /wp-admin/post-new.php1,534 ▲821.07 ▼1.92674.95 ▲24.8054.42 ▼5.00
Media Library /wp-admin/upload.php1,424 ▲214.11 ▼0.16109.66 ▲2.5551.48 ▲6.49
WPTools Masonry Gallery & Posts For Divi /wp-admin/admin.php?page=wptools-masonry-gallery-posts-for-divi9831.6529.0862.94
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0891.6923.9537.86
Categories /wp-admin/edit-tags.php?taxonomy=wpt-attachment-cat&post_type=attachment1,2642.2727.1433.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-posts
    • fs_active_plugins
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wptools-masonry-gallery-posts-for-divi/resources/views/masonry-image-gallery.php
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/includes/modules/MasonryPostTypeGallery/MasonryPostTypeGallery.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/includes/modules/DiviMasonryExtension.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/vendor/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WPT_Masonry_Divi_Modules\\MasonryPostTypeGallery\\MasonryPostTypeGallery' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/includes/modules/MasonryPostTypeGalleryFullWidth/MasonryPostTypeGalleryFullWidth.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/vendor/psr/container/src/NotFoundExceptionInterface.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/wptools-masonry-gallery-posts-for-divi/includes/classes/Loader.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: masonry blogs, masonry image gallery, divi masonry blogs, divi masonry, divi masonry image gallery

wptools-masonry-gallery-posts-for-divi/wptools-masonry-gallery-posts-for-divi.php 85% from 13 tests

"WPTools Masonry Gallery & Posts For Divi" version 3.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected37,855 lines of code in 204 files:
LanguageFilesBlank linesComment linesLines of code
PHP1678,61318,62737,113
JavaScript94571246
JSON300165
CSS20140111
reStructuredText19413597
SVG10067
YAML15035
XML11013
Markdown1508

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity53.14
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces17
Interfaces4
Traits0
Classes84
▷ Abstract classes22.38%
▷ Concrete classes8297.62%
▷ Final classes22.44%
Methods1,488
▷ Static methods21614.52%
▷ Public methods1,09773.72%
▷ Protected methods171.14%
▷ Private methods37425.13%
Functions166
▷ Named functions10261.45%
▷ Anonymous functions6438.55%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/wptools-masonry-gallery-posts-for-divi.png2.35KB1.54KB▼ 34.72%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%