84% masy-gallery

Code Review | Masy Gallery

WordPress plugin Masy Gallery scored84%from 54 tests.

About plugin

  • Plugin page: masy-gallery
  • Plugin version: 1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2018
  • Latest release: Feb 11, 2023
  • Number of updates: 13
  • Update frequency: every 143.3 days
  • Top authors: imdr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,214 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.91ms] Passed 4 tests

A check of server-side resources used by Masy Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.94 ▼12.51
Dashboard /wp-admin3.39 ▲0.0953.33 ▲3.23
Posts /wp-admin/edit.php3.51 ▲0.1657.98 ▲5.94
Add New Post /wp-admin/post-new.php5.98 ▲0.0996.06 ▼4.34
Media Library /wp-admin/upload.php3.30 ▲0.0740.54 ▼2.02
Documentation /wp-admin/edit.php?post_type=masy-gallery&page=masygal-doc-page3.3037.61
All Galleries /wp-admin/edit.php?post_type=masy-gallery3.3745.37
Add New /wp-admin/post-new.php?post_type=masy-gallery3.3549.92

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Masy Gallery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲31815.26 ▲0.918.61 ▲7.0242.27 ▼3.74
Dashboard /wp-admin2,368 ▲1916.22 ▲0.50114.55 ▲21.4539.97 ▼2.52
Posts /wp-admin/edit.php2,296 ▲1963.31 ▲1.2055.19 ▲19.5435.33 ▼1.13
Add New Post /wp-admin/post-new.php1,554 ▲2823.00 ▼0.66672.48 ▲41.3740.10 ▼22.85
Media Library /wp-admin/upload.php1,436 ▲334.01 ▼0.1989.08 ▼15.8145.12 ▼0.32
Documentation /wp-admin/edit.php?post_type=masy-gallery&page=masygal-doc-page1,2272.9738.6664.39
All Galleries /wp-admin/edit.php?post_type=masy-gallery1,2763.2445.1327.41
Add New /wp-admin/post-new.php?post_type=masy-gallery1,6443.5561.4637.50

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/masy-gallery/inc/masygal-masonry-shortcode.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/masy-gallery/inc/masygal-post-register.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/masy-gallery/inc/masygal-gallery-metabox.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/masy-gallery/masy-gallery.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/masy-gallery/inc/masygal-doc-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/masy-gallery/inc/masygal-justified-shortcode.php:63

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in masy-gallery/assets to your readme.txt
The official readme.txt is a good inspiration

masy-gallery/masy-gallery.php Passed 13 tests

"Masy Gallery" version 1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
40 characters long description:
Just an another wordpress gallery plugin

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
Success! There were no dangerous files found in this plugin613 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64517481
CSS107103
JavaScript25729

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin