84% so-masonry

Code Review | Masonry Widget

WordPress plugin Masonry Widget scored 84% from 54 tests.

About plugin

  • Plugin page: so-masonry
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2013
  • Latest release: Nov 27, 2013
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: gpriday (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 29,308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.04ms] Passed 4 tests

This is a short check of server-side resources used by Masonry Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.32 ▼6.50
Dashboard /wp-admin3.39 ▲0.0948.35 ▼5.72
Posts /wp-admin/edit.php3.51 ▲0.1550.42 ▲4.34
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.73 ▼0.89
Media Library /wp-admin/upload.php3.32 ▲0.0935.93 ▼3.06
Masonry /wp-admin/options-general.php?page=siteorigin_masonry3.2833.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_siteorigin-masonry
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Masonry Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.121.76 ▼0.0845.68 ▲3.01
Dashboard /wp-admin2,210 ▲224.87 ▼0.9894.73 ▼22.2838.71 ▼9.62
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0239.10 ▲4.5235.00 ▼0.30
Add New Post /wp-admin/post-new.php6,506 ▲4,97320.43 ▼2.82945.18 ▲283.2158.54 ▲5.13
Media Library /wp-admin/upload.php1,389 ▼24.17 ▼0.0598.51 ▼7.2743.75 ▼2.72
Masonry /wp-admin/options-general.php?page=siteorigin_masonry8012.1923.5627.07

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_siteorigin-masonry
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/so-masonry/tpl/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/so-masonry/inc/options.php:6
    • > PHP Notice
      Undefined variable: posts in wp-content/plugins/so-masonry/tpl/masonry.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/so-masonry/tpl/masonry.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/so-masonry/inc/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/so-masonry/so-masonry.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #3 in so-masonry/assets to your readme.txt
You can take inspiration from this readme.txt

so-masonry/so-masonry.php Passed 13 tests

The main file in "Masonry Widget" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
53 characters long description:
Gives you a stunning masonry layout for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,188 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4122122433
PHP55743309
LESS2491301
CSS1460145

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.50
▷ Minimum class complexity7.00
▷ Maximum class complexity8.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin