83% imagekit

Code Review | ImageKit - URL based image manipulation and optimization

WordPress plugin ImageKit - URL based image manipulation and optimization scored83%from 54 tests.

About plugin

  • Plugin page: imagekit
  • Plugin version: 4.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Aug 5, 2021
  • Number of updates: 43
  • Update frequency: every 40.7 days
  • Top authors: imagekit (67.44%)ahnvdhiman (34.88%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /20,356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.68ms] Passed 4 tests

An overview of server-side resources used by ImageKit - URL based image manipulation and optimization
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.47 ▼3.67
Dashboard /wp-admin3.45 ▲0.1448.97 ▼4.47
Posts /wp-admin/edit.php3.50 ▲0.1455.89 ▲4.03
Add New Post /wp-admin/post-new.php6.03 ▲0.1494.03 ▼8.90
Media Library /wp-admin/upload.php3.37 ▲0.1437.31 ▲2.34
ImageKit settings /wp-admin/options-general.php?page=imagekit-setting3.36496.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ImageKit - URL based image manipulation and optimization
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.071.77 ▲0.1345.86 ▲4.79
Dashboard /wp-admin2,199 ▲225.59 ▼0.0890.78 ▲1.3241.99 ▼8.85
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0439.71 ▲3.1735.28 ▼0.46
Add New Post /wp-admin/post-new.php1,529 ▲323.15 ▼0.13713.06 ▲54.7160.15 ▲14.51
Media Library /wp-admin/upload.php1,404 ▲44.21 ▼0.0397.24 ▼7.6240.67 ▼4.79
ImageKit settings /wp-admin/options-general.php?page=imagekit-setting1,0101.9922.8829.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/imagekit/imagekit.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin-install.php' (include_path='.:/usr/share/php') in wp-content/plugins/imagekit/includes/setting.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/imagekit/includes/setting.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/imagekit/includes/setting.php on line 2

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 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

imagekit/imagekit.php 92% from 13 tests

This is the main PHP file of "ImageKit - URL based image manipulation and optimization" version 4.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 318 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,557 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS126301,403
PHP43247561,152
Markdown1102

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity124.00
▷ Minimum class complexity45.00
▷ Maximum class complexity203.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods91
▷ Static methods8290.11%
▷ Public methods8593.41%
▷ Protected methods44.40%
▷ Private methods22.20%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants3
▷ Global constants3100.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
No PNG files were detected