84% multi-image-posts

Code Review | Multi Image Posts

WordPress plugin Multi Image Posts scored84%from 54 tests.

About plugin

  • Plugin page: multi-image-posts
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 14, 2016
  • Latest release: May 1, 2023
  • Number of updates: 23
  • Update frequency: every 110.2 days
  • Top authors: taniafi786 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /2,393 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.02MB] [CPU: ▼3.58ms] Passed 4 tests

This is a short check of server-side resources used by Multi Image Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.33 ▼4.13
Dashboard /wp-admin3.35 ▲0.0047.08 ▼16.53
Posts /wp-admin/edit.php3.47 ▲0.1151.38 ▲3.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.28 ▲8.64
Media Library /wp-admin/upload.php3.26 ▲0.0238.87 ▲2.95

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Image Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲22214.50 ▲0.401.87 ▼0.3236.21 ▼15.90
Dashboard /wp-admin2,326 ▲1466.22 ▲0.58105.97 ▲7.8974.36 ▲26.93
Posts /wp-admin/edit.php2,259 ▲1623.46 ▲1.4753.51 ▲17.1564.60 ▲27.50
Add New Post /wp-admin/post-new.php1,693 ▲16524.37 ▲1.35617.36 ▼82.5537.22 ▼16.70
Media Library /wp-admin/upload.php1,417 ▲174.24 ▲0.0590.13 ▼20.2181.42 ▲35.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • 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
Everything seems fine, however this is by no means an exhaustive test

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multi-image-posts/mutli-image-posts.php:12

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: posts, multi image posts, auto post, automatically posts, multiple posts...

multi-image-posts/mutli-image-posts.php 85% from 13 tests

The main PHP file in "Multi Image Posts" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 165 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multi-image-posts.php" instead of "mutli-image-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected180 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11221136
JavaScript111544

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png0.95KB0.10KB▼ 89.06%