90% delete-unscaled-images

Code Review | Delete Unscaled Images

WordPress plugin Delete Unscaled Images scored90%from 54 tests.

About plugin

  • Plugin page: delete-unscaled-i...
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Nov 8, 2022
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: swinggraphics (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /978 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.36ms] Passed 4 tests

Server-side resources used by Delete Unscaled Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.91 ▲0.15
Dashboard /wp-admin3.31 ▲0.0152.10 ▲0.51
Posts /wp-admin/edit.php3.36 ▲0.0146.40 ▼4.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.32 ▼25.05
Media Library /wp-admin/upload.php3.23 ▲0.0033.57 ▼0.03
Delete Unscaled /wp-admin/upload.php?page=sg-unscaled-images3.2030.41

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Delete Unscaled Images: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.181.71 ▼0.0941.96 ▼5.97
Dashboard /wp-admin2,201 ▲134.84 ▼0.04110.32 ▲5.0941.76 ▲0.25
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0239.32 ▼3.2534.97 ▲0.62
Add New Post /wp-admin/post-new.php1,539 ▼323.03 ▲4.84659.64 ▲45.8865.83 ▲12.96
Media Library /wp-admin/upload.php1,392 ▲104.25 ▲0.0397.06 ▼0.6444.26 ▼1.80
Delete Unscaled /wp-admin/upload.php?page=sg-unscaled-images7572.0523.8927.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: images, media uploader

delete-unscaled-images/delete-unscaled-images.php 92% from 13 tests

"Delete Unscaled Images" version 1.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin88 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121588

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions5
▷ Named functions5100.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 images were found in this plugin