79% multi-image-widget

Code Review | Multi Image Widget

WordPress plugin Multi Image Widget scored 79% from 54 tests.

About plugin

  • Plugin page: multi-image-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.1.1
  • WordPress version: 5.8.1
  • First release: May 19, 2015
  • Latest release: May 27, 2015
  • Number of updates: 11
  • Update frequency: every 0.7 days
  • Top authors: shankaranand12 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 3,248 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼146.67ms] Passed 4 tests

This is a short check of server-side resources used by Multi Image Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0626.82 ▲0.36
Dashboard /wp-admin3.13 ▲0.0636.95 ▼5.14
Posts /wp-admin/edit.php3.24 ▲0.1342.82 ▲7.48
Add New Post /wp-admin/post-new.php5.47 ▲0.0374.67 ▼580.74
Media Library /wp-admin/upload.php3.05 ▲0.0525.33 ▼1.15

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 1 new option
New WordPress options
widget_miw_multi_image_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Image Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,031 ▲37917.75 ▲2.179.94 ▲3.0174.77 ▼7.52
Dashboard /wp-admin3,128 ▲2298.07 ▲1.92138.65 ▲7.03169.20 ▼9.03
Posts /wp-admin/edit.php2,973 ▲2675.33 ▲2.0880.68 ▲15.03138.75 ▲0.71
Add New Post /wp-admin/post-new.php2,070 ▼1,74421.81 ▲2.95373.28 ▼107.47176.95 ▲3.07
Media Library /wp-admin/upload.php1,757 ▲55.54 ▼0.00107.81 ▼46.16183.12 ▲0.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_miw_multi_image_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/multi-image-widget/multi-image-widget.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multi-image-widget/widget/miw-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: slider widget, multiple image upload widget, image widget, image upload widget, slider image widget...

multi-image-widget/multi-image-widget.php Passed 13 tests

Analyzing the main PHP file in "Multi Image Widget" version 1.1
70 characters long description:
This plugin have the feature for upload the multiple image via widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin511 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP46192237
CSS42043171
JavaScript31936103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.00
▷ Minimum class complexity9.00
▷ Maximum class complexity27.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/grabbing.png0.11KB0.14KB0.00%
assets/images/Delete.png2.16KB1.45KB▼ 33.12%