84% my-upload-images

Code Review | My Upload Images

WordPress plugin My Upload Images scored84%from 54 tests.

About plugin

  • Plugin page: my-upload-images
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Mar 14, 2017
  • Number of updates: 33
  • Update frequency: every 24.0 days
  • Top authors: fishpie (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /5,188 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.01MB] [CPU: ▼4.39ms] Passed 4 tests

This is a short check of server-side resources used by My Upload Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.40 ▼0.69
Dashboard /wp-admin3.32 ▲0.0151.26 ▼2.16
Posts /wp-admin/edit.php3.37 ▲0.0146.61 ▼5.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.48 ▼8.84
Media Library /wp-admin/upload.php3.24 ▲0.0138.92 ▲1.05
My Upload Images /wp-admin/options-general.php?page=my-upload-images/my-upload-images.php3.2135.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
mui_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for My Upload Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.29 ▼1.085.34 ▲3.3044.54 ▲2.94
Dashboard /wp-admin2,213 ▲254.87 ▼0.02101.98 ▼5.7041.58 ▼2.56
Posts /wp-admin/edit.php2,090 ▲41.99 ▼0.0736.96 ▼3.3431.05 ▼7.08
Add New Post /wp-admin/post-new.php1,536 ▲2223.29 ▲5.81676.25 ▲55.9556.26 ▲5.68
Media Library /wp-admin/upload.php1,392 ▲74.26 ▼0.0598.53 ▼5.2845.55 ▲0.05
My Upload Images /wp-admin/options-general.php?page=my-upload-images/my-upload-images.php1,0032.0722.9233.60

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • mui_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 load_plugin_textdomain() in wp-content/plugins/my-upload-images/my-upload-images.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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Select post types you’d like to display metabox.), #2 (Just upload and sort images.)
Please take inspiration from this readme.txt

my-upload-images/my-upload-images.php 92% from 13 tests

The principal PHP file in "My Upload Images" v. 1.4.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected449 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25187449

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity134.00
▷ Minimum class complexity134.00
▷ Maximum class complexity134.00
Average method complexity14.30
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected