84% interactive-image

Code Review | Interactive Image

WordPress plugin Interactive Image scored84%from 54 tests.

About plugin

  • Plugin page: interactive-image
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 27, 2021
  • Latest release: Nov 13, 2023
  • Number of updates: 20
  • Update frequency: every 40.4 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Interactive Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.91 ▲1.83
Dashboard /wp-admin3.34 ▲0.0450.27 ▲2.54
Posts /wp-admin/edit.php3.46 ▲0.1048.65 ▲1.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.05 ▼14.60
Media Library /wp-admin/upload.php3.24 ▲0.0139.64 ▲5.62

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: 2 new tables, 6 new options
New tables
wp_interactive_image_data
wp_interactive_image
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Interactive Image: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲16514.60 ▲0.261.80 ▼0.1743.32 ▼0.70
Dashboard /wp-admin2,360 ▲1806.33 ▲0.68111.94 ▲24.3978.23 ▲39.77
Posts /wp-admin/edit.php2,288 ▲1853.49 ▲1.5447.20 ▲11.8371.62 ▲33.25
Add New Post /wp-admin/post-new.php1,703 ▲17722.22 ▼1.02621.45 ▼87.9428.18 ▼39.56
Media Library /wp-admin/upload.php1,428 ▲284.28 ▲0.1183.98 ▼11.9092.84 ▲47.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | 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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/interactive-image/views/shortcode.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/interactive-image/interactive-image.php:27
    • > PHP Notice
      Undefined variable: interactive_image in wp-content/plugins/interactive-image/views/shortcode.tpl.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/interactive-image/views/interactive_images_list.php:38
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/interactive-image/views/shortcode.tpl.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/interactive-image/views/interactive_image_creator.php:1

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 issues were found

Optimizations

Plugin configuration 93% 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
5 plugin tags: hotspot, zone, image, interactive, draw

interactive-image/interactive-image.php 85% from 13 tests

Analyzing the main PHP file in "Interactive Image" version 1.12
Please make the necessary changes and fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,052 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS363501,258
PHP442640497
JavaScript318638248
SVG10149

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/save.png0.54KB0.39KB▼ 28.11%
images/hotspot.png1.11KB1.09KB▼ 1.93%
images/icon.png0.83KB0.87KB0.00%
images/remove.png1.27KB1.20KB▼ 5.76%
images/edit.png0.87KB0.87KB0.00%