84% image-hotspot

Code Review | Image Hotspot

WordPress plugin Image Hotspot scored84%from 54 tests.

About plugin

  • Plugin page: image-hotspot
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Apr 22, 2016
  • Number of updates: 5
  • Update frequency: every 45.0 days
  • Top authors: jonathanbardo (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,717 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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.98ms] Passed 4 tests

An overview of server-side resources used by Image Hotspot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.48 ▼5.15
Dashboard /wp-admin3.36 ▲0.0545.35 ▼5.82
Posts /wp-admin/edit.php3.41 ▲0.0544.86 ▼1.03
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.15 ▼11.01
Media Library /wp-admin/upload.php3.28 ▲0.0532.85 ▼1.93

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Image Hotspot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.26 ▼1.174.47 ▲2.6441.59 ▼3.17
Dashboard /wp-admin2,215 ▲245.82 ▼0.09101.65 ▼1.6637.95 ▼8.88
Posts /wp-admin/edit.php2,104 ▲152.06 ▲0.0639.38 ▼0.6932.36 ▼7.21
Add New Post /wp-admin/post-new.php1,532 ▲1318.48 ▼4.85607.75 ▼96.0053.15 ▲1.03
Media Library /wp-admin/upload.php1,397 ▲124.22 ▲0.0295.98 ▼3.9642.59 ▲1.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/image-hotspot/image-hotspot.php:16

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: image, thumbnails, resize

image-hotspot/image-hotspot.php 92% from 13 tests

"Image Hotspot" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected451 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript26422212
PHP18090212
CSS24027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin