77% wp-image-makers-easy-hotspot-solution

Code Review | WP Image Markers - Easy Hotspot Solution

WordPress plugin WP Image Markers - Easy Hotspot Solution scored77%from 54 tests.

About plugin

  • Plugin page: wp-image-makers-e...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Mar 8, 2018
  • Number of updates: 6
  • Update frequency: every 5.0 days
  • Top authors: wedesignwebuild (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /12,633 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.57ms] Passed 4 tests

An overview of server-side resources used by WP Image Markers - Easy Hotspot Solution
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.98 ▼6.40
Dashboard /wp-admin3.34 ▼0.0150.01 ▼14.34
Posts /wp-admin/edit.php3.39 ▲0.0347.83 ▼3.82
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.67 ▼21.73
Media Library /wp-admin/upload.php3.26 ▲0.0336.05 ▲1.98
Add New /wp-admin/post-new.php?post_type=wp_image_markers3.3851.01
Image Markers /wp-admin/edit.php?post_type=wp_image_markers3.3041.36

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 91 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Image Markers - Easy Hotspot Solution
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲11813.80 ▼0.818.41 ▲6.0444.35 ▼0.00
Dashboard /wp-admin2,222 ▲455.53 ▼0.2383.05 ▼7.3738.46 ▼0.92
Posts /wp-admin/edit.php2,127 ▲271.95 ▼0.0236.25 ▼4.3330.99 ▼5.41
Add New Post /wp-admin/post-new.php1,549 ▲1823.02 ▼0.07676.95 ▼1.2560.93 ▲7.20
Media Library /wp-admin/upload.php1,427 ▲304.31 ▲0.1197.07 ▼14.4142.61 ▼6.05
Add New /wp-admin/post-new.php?post_type=wp_image_markers1,9295.50112.2332.72
Image Markers /wp-admin/edit.php?post_type=wp_image_markers1,0881.9629.6928.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPIM\\Field\\Control' not found in wp-content/plugins/wp-image-makers-easy-hotspot-solution/includes/Field/TextGroupControl.php:5
    • > PHP Warning
      include(WPIM_DIRincludes/helpers.php): failed to open stream: No such file or directory in wp-content/plugins/wp-image-makers-easy-hotspot-solution/bootstrap.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WPIM\\Field\\Control' not found in wp-content/plugins/wp-image-makers-easy-hotspot-solution/includes/Field/IconPickerControl.php:5
    • > PHP Notice
      Undefined variable: infowindow in wp-content/plugins/wp-image-makers-easy-hotspot-solution/templates/infowindow/content-post.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_content() on null in wp-content/plugins/wp-image-makers-easy-hotspot-solution/templates/infowindow/content-product.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPIM\\Field\\Control' not found in wp-content/plugins/wp-image-makers-easy-hotspot-solution/includes/Field/SliderControl.php:5
    • > PHP Notice
      Undefined variable: infowindow in wp-content/plugins/wp-image-makers-easy-hotspot-solution/templates/infowindow/content-product.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'WPIM\\Field\\Control' not found in wp-content/plugins/wp-image-makers-easy-hotspot-solution/includes/Field/RadioImageControl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPIM\\Field\\Control' not found in wp-content/plugins/wp-image-makers-easy-hotspot-solution/includes/Field/ColorPickerControl.php:5
    • > PHP Notice
      Undefined variable: collection in wp-content/plugins/wp-image-makers-easy-hotspot-solution/templates/markers.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=wp_image_markers
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-image-makers-easy-hotspot-solution/assets/vendors/wp-color-picker-alpha/wp-color-picker-alpha.js?ver=1.0.0 23:16 Uncaught ReferenceError: wpColorPickerL10n is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid url: ""
The official readme.txt might help

wp-image-makers-easy-hotspot-solution/wp-image-markers.php 85% from 13 tests

"WP Image Markers - Easy Hotspot Solution" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-image-makers-easy-hotspot-solution.php" instead of "wp-image-markers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected14,108 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
CSS83631104,505
JavaScript98441,0814,002
Sass744342,841
PHP427546012,759
JSON1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.72
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods132
▷ Static methods1410.61%
▷ Public methods12191.67%
▷ Protected methods10.76%
▷ Private methods107.58%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/markers/marker-0.png2.99KB0.00KB▼ 100.00%
assets/images/select2.png0.60KB0.99KB0.00%
assets/images/select2x2.png0.83KB0.77KB▼ 6.15%
assets/images/remove.png0.26KB0.25KB▼ 3.77%
assets/images/add.png0.13KB0.11KB▼ 17.91%