77% multi-gallery-for-posts-and-cutom-posts

Code Review | Multi Gallery for Posts and cutom posts

WordPress plugin Multi Gallery for Posts and cutom posts scored77%from 54 tests.

About plugin

  • Plugin page: multi-gallery-for...
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2019
  • Latest release: Sep 8, 2019
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: muthe_ashok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,468 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.68MB] [CPU: ▼19.54ms] Passed 4 tests

Server-side resources used by Multi Gallery for Posts and cutom posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.11 ▼6.47
Dashboard /wp-admin3.32 ▲0.0246.15 ▼6.51
Posts /wp-admin/edit.php3.37 ▲0.0154.79 ▲0.66
Add New Post /wp-admin/post-new.php3.10 ▼2.7835.85 ▼65.84
Media Library /wp-admin/upload.php3.24 ▲0.0139.03 ▲1.85
Multi Gallery /wp-admin/upload.php?page=multi_galery3.1933.68

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multi Gallery for Posts and cutom posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.61 ▲0.261.95 ▲0.2045.92 ▼0.59
Dashboard /wp-admin2,206 ▲265.53 ▼0.1386.12 ▼13.1143.30 ▼2.13
Posts /wp-admin/edit.php2,111 ▲112.00 ▼0.0139.91 ▼2.0341.20 ▼0.92
Add New Post /wp-admin/post-new.php1,536 ▲1023.13 ▼0.02685.39 ▲20.7251.24 ▼9.23
Media Library /wp-admin/upload.php1,405 ▲24.25 ▲0.11106.46 ▼4.7646.02 ▲1.16
Multi Gallery /wp-admin/upload.php?page=multi_galery7932.0428.4527.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/upload.php?page=multi_galery
    • > Notice in wp-content/plugins/multi-gallery-for-posts-and-cutom-posts/img_multi.php+57
    Undefined variable: checked

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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-gallery-for-posts-and-cutom-posts/img_multi.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === multi-gallery-for-posts-and-cutom-posts === )
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

multi-gallery-for-posts-and-cutom-posts/img_multi.php 85% from 13 tests

"Multi Gallery for Posts and cutom posts" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.1" instead of "5.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("multi-gallery-for-posts-and-cutom-posts.php" instead of "img_multi.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin168 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP131590
JavaScript120355
CSS14023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin