89% hotspot

Code Review | Hotspot

WordPress plugin Hotspot scored 89% from 54 tests.

About plugin

  • Plugin page: hotspot
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Jan 5, 2021
  • Latest release: Mar 30, 2021
  • Number of updates: 3
  • Update frequency: every 29.7 days
  • Top authors: xolosoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 676 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼152.54ms] Passed 4 tests

This is a short check of server-side resources used by Hotspot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.2334.32 ▼3.47
Dashboard /wp-admin3.29 ▲0.2445.46 ▲8.92
Posts /wp-admin/edit.php3.40 ▲0.3044.80 ▲3.12
Add New Post /wp-admin/post-new.php5.64 ▲0.2197.39 ▼608.37
Media Library /wp-admin/upload.php3.23 ▲0.2335.27 ▼1.42
All Items /wp-admin/edit.php?post_type=points_pin3.3134.94
Add New /wp-admin/post-new.php?post_type=points_pin3.3549.60

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Hotspot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,902 ▲33016.70 ▲0.9614.35 ▲2.3047.26 ▼4.03
Dashboard /wp-admin3,060 ▲1266.99 ▲0.99136.46 ▼14.08111.46 ▲0.08
Posts /wp-admin/edit.php2,856 ▲1172.84 ▲0.1472.75 ▲10.26117.10 ▲26.42
Add New Post /wp-admin/post-new.php1,736 ▲6419.00 ▲0.24357.92 ▲17.69130.22 ▲22.02
Media Library /wp-admin/upload.php1,912 ▲1025.57 ▲0.55133.69 ▼18.60110.22 ▼14.43
All Items /wp-admin/edit.php?post_type=points_pin1,7724.4188.6676.96
Add New /wp-admin/post-new.php?post_type=points_pin3,6828.74209.23123.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hotspot/hotspot.php
    • > /wp-content/plugins/hotspot/admin/inc/add_shortcode_xolo_hotspot.php
    • > /wp-content/plugins/hotspot/admin/inc/metabox-upgrade.php
    • > /wp-content/plugins/hotspot/admin/inc/cpt-hotspot.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hotspot/admin/inc/xolo-hotspot-notices.php:55

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: image, image hotspot, points, maps, hotspot

hotspot/hotspot.php Passed 13 tests

The main file in "Hotspot" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
103 characters long description:
Create an awesome pins for your image. It can be use for any highlighted points and dots on your image.

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 detected2,904 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS3180211,373
PHP51461701,044
JavaScript54786487

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity14.00
▷ Minimum class complexity9.00
▷ Maximum class complexity19.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods426.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
PNG images were not found in this plugin