84% resize-image-after-upload

Code Review | Resize Image After Upload

WordPress plugin Resize Image After Upload scored84%from 54 tests.

About plugin

  • Plugin page: resize-image-afte...
  • Plugin version: 1.8.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Sep 13, 2012
  • Latest release: Aug 5, 2023
  • Number of updates: 69
  • Update frequency: every 57.9 days
  • Top authors: jepsonrae (73.91%)petredobrescu (17.39%)ShortPixel (11.59%)

Code review

54 tests

User reviews

52 reviews

Install metrics

90,000+ active /586,868 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.07MB] [CPU: ▼6.12ms] Passed 4 tests

A check of server-side resources used by Resize Image After Upload
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.96 ▲4.32
Dashboard /wp-admin3.37 ▲0.0747.50 ▼3.82
Posts /wp-admin/edit.php3.43 ▲0.0750.32 ▲2.60
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.41 ▼27.27
Media Library /wp-admin/upload.php3.30 ▲0.0734.19 ▲4.00
Resize Image Upload /wp-admin/options-general.php?page=resize-after-upload3.2630.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
jr_resizeupload_recompress_yesno
widget_recent-posts
widget_recent-comments
jr_resizeupload_convertpng_yesno
jr_resizeupload_resize_yesno
jr_resizeupload_width
can_compress_scripts
jr_resizeupload_quality
jr_resizeupload_convertgif_yesno
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Resize Image After Upload
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.72 ▼0.002.03 ▲0.3644.60 ▲3.12
Dashboard /wp-admin2,199 ▲225.56 ▼0.1180.50 ▼12.9439.03 ▼7.95
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0333.74 ▼3.6335.31 ▼2.49
Add New Post /wp-admin/post-new.php1,538 ▲418.37 ▼0.06591.05 ▼61.5570.71 ▼5.76
Media Library /wp-admin/upload.php1,407 ▲74.27 ▲0.0896.05 ▼1.9745.07 ▼0.65
Resize Image Upload /wp-admin/options-general.php?page=resize-after-upload1,5672.1223.0835.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 15 options in the database
    • jr_resizeupload_resize_yesno
    • db_upgraded
    • jr_resizeupload_recompress_yesno
    • widget_recent-posts
    • jr_resizeupload_convertgif_yesno
    • jr_resizeupload_convertbmp_yesno
    • jr_resizeupload_width
    • jr_resizeupload_convertpng_yesno
    • jr_resizeupload_quality
    • widget_recent-comments
    • ...

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/resize-image-after-upload/resize-image-after-upload.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Full preview of the settings screen.)
You can look at the official readme.txt

resize-image-after-upload/resize-image-after-upload.php 92% from 13 tests

The main PHP script in "Resize Image After Upload" version 1.8.6 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 255 characters long)

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 plugin402 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114568402

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.48
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%
Functions9
▷ Named functions9100.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/shortpixel.png5.41KB4.93KB▼ 8.90%
icon-128x128.png6.45KB4.75KB▼ 26.35%
img/sp.png4.63KB2.34KB▼ 49.41%