84% upload-multiple-image

Code Review | Upload Multiple Image

WordPress plugin Upload Multiple Image scored84%from 54 tests.

About plugin

  • Plugin page: upload-multiple-i...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8
  • WordPress version: 6.3.1
  • First release: Jan 28, 2014
  • Latest release: Feb 12, 2014
  • Number of updates: 9
  • Update frequency: every 1.8 days
  • Top authors: suhasrathod (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /2,365 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Upload Multiple Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.89 ▼6.48
Dashboard /wp-admin3.32 ▲0.0252.00 ▼7.32
Posts /wp-admin/edit.php3.37 ▲0.0252.21 ▼0.17
Add New Post /wp-admin/post-new.php3.11 ▼2.7738.80 ▼61.76
Media Library /wp-admin/upload.php3.24 ▲0.0239.51 ▲3.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Upload Multiple Image: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▲0.041.77 ▲0.0839.37 ▼6.12
Dashboard /wp-admin2,198 ▲215.62 ▼0.0689.26 ▼7.8939.49 ▼2.58
Posts /wp-admin/edit.php2,103 ▲61.99 ▼0.0038.15 ▲1.1734.92 ▼1.63
Add New Post /wp-admin/post-new.php6,230 ▲4,70425.91 ▲2.67941.87 ▲220.8952.80 ▼4.33
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.0296.86 ▼20.2543.83 ▼7.36

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/upload-multiple-image/upload-multi-image.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
5 plugin tags: multiple upload, upload image, multi, metabox, image

upload-multiple-image/upload-multi-image.php 92% from 13 tests

The main PHP file in "Upload Multiple Image" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("upload-multiple-image.php" instead of "upload-multi-image.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin144 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11835100
JavaScript18244

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/remove.png1.78KB1.53KB▼ 14.12%