78% imagemagick-sharpen-resized-images

Code Review | ImageMagick Sharpen Resized Images

WordPress plugin ImageMagick Sharpen Resized Images scored78%from 54 tests.

About plugin

  • Plugin page: imagemagick-sharp...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Sep 30, 2017
  • Number of updates: 33
  • Update frequency: every 36.7 days
  • Top authors: niwreg (60.61%)HansVanEijsden (42.42%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /31,285 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.03MB] [CPU: ▼9.64ms] Passed 4 tests

A check of server-side resources used by ImageMagick Sharpen Resized Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.95 ▼8.43
Dashboard /wp-admin3.34 ▲0.0447.87 ▼9.54
Posts /wp-admin/edit.php3.39 ▲0.0448.82 ▼3.65
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.87 ▼16.93
Media Library /wp-admin/upload.php3.26 ▲0.0340.25 ▲5.70
IM Sharpen Images /wp-admin/options-general.php?page=imagemagick-sharpen-resized-images/imagick-sharpen-resized-images.php3.2329.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 12 new options
New WordPress options
Sharpening
widget_recent-posts
AutoConLev
CompressionQuality
theysaidso_admin_options
widget_theysaidso_widget
Radius
Sigma
can_compress_scripts
Threshold
...

Browser metrics Passed 4 tests

A check of browser resources used by ImageMagick Sharpen Resized Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.22 ▼1.084.16 ▲2.3445.96 ▲2.15
Dashboard /wp-admin2,225 ▲195.85 ▲0.96108.47 ▼7.1642.78 ▼4.49
Posts /wp-admin/edit.php2,107 ▲72.04 ▼0.0239.58 ▼0.3536.26 ▼0.85
Add New Post /wp-admin/post-new.php1,552 ▲2023.41 ▲0.11665.42 ▼17.4051.79 ▼6.99
Media Library /wp-admin/upload.php1,407 ▲44.29 ▲0.04108.08 ▲4.0455.98 ▲11.80
IM Sharpen Images /wp-admin/options-general.php?page=imagemagick-sharpen-resized-images/imagick-sharpen-resized-images.php1,1516.33159.7259.26

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 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Imagick' not found in wp-content/plugins/imagemagick-sharpen-resized-images/check.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/imagemagick-sharpen-resized-images/imagick-sharpen-resized-images.php:177

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=imagemagick-sharpen-resized-images/imagick-sharpen-resized-images.php
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=imagemagick-sharpen-resized-images/imagick-sharpen-resized-images.php
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

imagemagick-sharpen-resized-images/imagick-sharpen-resized-images.php 92% from 13 tests

The primary PHP file in "ImageMagick Sharpen Resized Images" version 1.1.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("imagemagick-sharpen-resized-images.php" instead of "imagick-sharpen-resized-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin146 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24340146

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions6
▷ Named functions6100.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.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png19.04KB20.29KB0.00%