94% devvn-image-hotspot

Code Review | Image Hotspot by DevVN

WordPress plugin Image Hotspot by DevVN scored 94% from 54 tests.

About plugin

  • Plugin page: devvn-image-hotspot
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.6
  • WordPress version: 5.8.1
  • First release: Sep 26, 2016
  • Latest release: Dec 14, 2020
  • Number of updates: 33
  • Update frequency: every 46.8 days
  • Top authors: levantoan (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

20,000+ active / 126,612 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼145.32ms] Passed 4 tests

A check of server-side resources used by Image Hotspot by DevVN
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1535.83 ▲15.36
Dashboard /wp-admin3.09 ▲0.0344.21 ▼0.39
Posts /wp-admin/edit.php3.14 ▲0.0344.68 ▼2.12
Add New Post /wp-admin/post-new.php5.45 ▲0.0288.08 ▼582.04
Media Library /wp-admin/upload.php3.03 ▲0.0334.60 ▲3.28
All Items /wp-admin/edit.php?post_type=points_image3.1138.51
Add New /wp-admin/post-new.php?post_type=points_image3.1444.54

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Image Hotspot by DevVN
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,844 ▲24816.29 ▲0.7112.68 ▲3.9253.27 ▲6.49
Dashboard /wp-admin3,001 ▲706.01 ▼0.12131.36 ▼7.09109.36 ▼4.42
Posts /wp-admin/edit.php2,770 ▲312.70 ▲0.0264.33 ▼3.0381.49 ▼10.34
Add New Post /wp-admin/post-new.php1,518 ▼35418.87 ▼0.41361.93 ▼10.61107.36 ▲2.71
Media Library /wp-admin/upload.php1,838 ▲315.02 ▼0.00141.75 ▼0.46117.40 ▼4.54
All Items /wp-admin/edit.php?post_type=points_image1,6784.2485.0371.76
Add New /wp-admin/post-new.php?post_type=points_image3,1918.64183.98112.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/devvn-image-hotspot/devvn-image-hotspot.php
    • > /wp-content/plugins/devvn-image-hotspot/admin/inc/cpt-ihotspot.php
    • > /wp-content/plugins/devvn-image-hotspot/admin/inc/add_shortcode_devvn_ihotspot.php
    • > /wp-content/plugins/devvn-image-hotspot/admin/inc/metabox-donate.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
The official readme.txt might help

devvn-image-hotspot/devvn-image-hotspot.php Passed 13 tests

The entry point to "Image Hotspot by DevVN" version 1.2.1 is a PHP file that has certain tags in its header comment area
50 characters long description:
Image Hotspot help you add hotspot to your images.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,755 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions21100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.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
2 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png159.60KB56.27KB▼ 64.74%
screenshot-2.png72.12KB34.03KB▼ 52.81%