89% wp-imsizer

Code Review | WP Imsizer

WordPress plugin WP Imsizer scored89%from 54 tests.

About plugin

  • Plugin page: wp-imsizer
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Nov 8, 2023
  • Number of updates: 32
  • Update frequency: every 42.8 days
  • Top authors: endurox (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.20ms] Passed 4 tests

Analyzing server-side resources used by WP Imsizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.03 ▼3.17
Dashboard /wp-admin3.39 ▲0.0444.06 ▼25.07
Posts /wp-admin/edit.php3.44 ▲0.0846.82 ▲0.38
Add New Post /wp-admin/post-new.php5.97 ▲0.0889.08 ▼8.94
Media Library /wp-admin/upload.php3.31 ▲0.0832.18 ▲4.01
WP Imsizer /wp-admin/options-general.php?page=wp-imsizer3.2729.33

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 18 new options
New WordPress options
widget_recent-comments
wp_imsizer_height
wp_imsizer_convertpng_yesno
theysaidso_admin_options
wp_imsizer_file_size_error
wp_imsizer_wplimit_onoff
widget_recent-posts
widget_theysaidso_widget
wp_imsizer_width
wp_imsizer_setalts
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Imsizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.23 ▼0.491.89 ▲0.1243.90 ▲0.72
Dashboard /wp-admin2,202 ▲225.62 ▼0.0484.21 ▼7.5338.61 ▼0.48
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0438.89 ▲2.3535.20 ▼2.56
Add New Post /wp-admin/post-new.php1,529 ▲322.99 ▼0.18595.22 ▼61.9852.21 ▲1.11
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.1097.14 ▲0.9744.72 ▲3.56
WP Imsizer /wp-admin/options-general.php?page=wp-imsizer1,0352.0124.1932.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (WP Imsizer options page.)
You can look at the official readme.txt

wp-imsizer/wp-imsizer.php 92% from 13 tests

The main PHP file in "WP Imsizer" ver. 1.2.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)

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
No dangerous file extensions were detected422 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP360132422

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.25MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp-imsizer-logo.png37.00KB12.77KB▼ 65.49%
screenshot-1.png217.96KB67.26KB▼ 69.14%