74% monster-gallery

Code Review | Monster Gallery

WordPress plugin Monster Gallery scored74%from 54 tests.

About plugin

  • Plugin page: monster-gallery
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Feb 6, 2019
  • Latest release: Nov 12, 2019
  • Number of updates: 9
  • Update frequency: every 31.0 days
  • Top authors: vmoshikov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,183 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.94MB] [CPU: ▼53.19ms] Passed 4 tests

A check of server-side resources used by Monster Gallery
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.425.11 ▼34.08
Dashboard /wp-admin2.07 ▼1.245.36 ▼39.23
Posts /wp-admin/edit.php2.07 ▼1.298.28 ▼46.28
Add New Post /wp-admin/post-new.php2.07 ▼3.827.33 ▼93.18
Media Library /wp-admin/upload.php2.07 ▼1.165.75 ▼30.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Monster Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲23314.35 ▼0.019.91 ▲8.0841.71 ▼2.96
Dashboard /wp-admin2,216 ▲255.22 ▲0.35102.70 ▼3.2439.82 ▼0.23
Posts /wp-admin/edit.php2,105 ▲162.40 ▲0.4141.25 ▲1.4436.45 ▼0.69
Add New Post /wp-admin/post-new.php1,538 ▲2417.54 ▼0.09684.80 ▲17.9937.63 ▼27.72
Media Library /wp-admin/upload.php1,404 ▲164.54 ▲0.34101.58 ▼10.0743.10 ▼7.46

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
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the monstergallery_script_flickity handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/monster-gallery/functions.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (This is the create gallery.), #2 (This grid gallery with lighbox.), #3 (This gallery slider.)
The official readme.txt might help

monster-gallery/functions.php 92% from 13 tests

"Monster Gallery" version 1.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("monster-gallery.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected203 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript52341163
PHP161316
SVG10015
CSS3039

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png3.53KB3.53KB0.08%