84% mhm-forceimagemagick

Code Review | Force use of ImageMagick image library

WordPress plugin Force use of ImageMagick image library scored84%from 54 tests.

About plugin

  • Plugin page: mhm-forceimagemagick
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7.0
  • WordPress version: 6.3.1
  • First release: May 2, 2016
  • Latest release: Dec 19, 2016
  • Number of updates: 15
  • Update frequency: every 159.5 days
  • Top authors: markhowellsmead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /9,177 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Force use of ImageMagick image library
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.64 ▼7.36
Dashboard /wp-admin3.31 ▲0.0144.92 ▼11.50
Posts /wp-admin/edit.php3.36 ▲0.0146.01 ▼3.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.42 ▼15.60
Media Library /wp-admin/upload.php3.23 ▲0.0133.51 ▼2.94

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Force use of ImageMagick image library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.22 ▼1.391.87 ▲0.2041.35 ▼5.99
Dashboard /wp-admin2,206 ▲184.84 ▼0.05100.49 ▼19.6441.82 ▼6.36
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0336.08 ▼2.4232.43 ▼5.53
Add New Post /wp-admin/post-new.php1,514 ▼1917.66 ▼5.52693.87 ▲16.2756.72 ▲1.82
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.02100.22 ▼4.9341.64 ▼3.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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
Good news, no errors were detected

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/mhm-forceimagemagick/index.php:16

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 Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: gd, meta data, imagemagick, iptc, images...

mhm-forceimagemagick/index.php 85% from 13 tests

The entry point to "Force use of ImageMagick image library" version 1.0.6 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 231 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("mhm-forceimagemagick.php" instead of "index.php")

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
There were no executable files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13814

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin