78% mabel-shoppable-images-lite

Code Review | Shoppable Images

WordPress plugin Shoppable Images scored78%from 54 tests.

About plugin

  • Plugin page: mabel-shoppable-i...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2017
  • Latest release: Oct 12, 2023
  • Number of updates: 33
  • Update frequency: every 67.8 days
  • Top authors: studiowombat (90.91%)maartenbelmans (12.12%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10,000+ active /79,327 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by Shoppable Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1545.63 ▲6.89
Dashboard /wp-admin3.60 ▲0.2948.79 ▼0.85
Posts /wp-admin/edit.php3.65 ▲0.2944.55 ▼5.17
Add New Post /wp-admin/post-new.php6.12 ▲0.2395.36 ▼4.51
Media Library /wp-admin/upload.php3.46 ▲0.2337.16 ▼1.32
Shoppable Images Lite /wp-admin/options-general.php?page=mabel-shoppable-images-lite3.5137.19

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Shoppable Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.52 ▼0.838.42 ▲6.4943.01 ▲0.75
Dashboard /wp-admin2,202 ▲255.63 ▲0.0383.56 ▼4.0638.65 ▲0.78
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0436.11 ▲1.8435.02 ▼2.70
Add New Post /wp-admin/post-new.php1,538 ▲1018.42 ▼4.65661.34 ▼26.8768.53 ▲17.88
Media Library /wp-admin/upload.php1,401 ▼24.21 ▼0.05107.07 ▲6.8047.54 ▲4.65
Shoppable Images Lite /wp-admin/options-general.php?page=mabel-shoppable-images-lite1,4894.3996.2034.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mabel-shoppable-images-lite/core/views/fields/colorpicker.php
    • > /wp-content/plugins/mabel-shoppable-images-lite/core/views/widget_form.php
    • > /wp-content/plugins/mabel-shoppable-images-lite/core/views/fields/container-option.php
    • > /wp-content/plugins/mabel-shoppable-images-lite/core/views/fields/hidden.php
  • 38× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_SILITE\\Core\\Common\\Presentation_Base' not found in wp-content/plugins/mabel-shoppable-images-lite/core/common/class-frontend.php:6
    • > PHP Notice
      Undefined variable: option in wp-content/plugins/mabel-shoppable-images-lite/core/views/fields/container-option.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mabel-shoppable-images-lite/admin/views/all_images.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'MABEL_SILITE\\Core\\Models\\Option' not found in wp-content/plugins/mabel-shoppable-images-lite/core/models/class-hidden-option.php:5
    • > PHP Notice
      Trying to get property 'value' of non-object in wp-content/plugins/mabel-shoppable-images-lite/core/views/fields/hidden.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/mabel-shoppable-images-lite/admin/views/add_image.php:3
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/mabel-shoppable-images-lite/core/views/fields/colorpicker.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mabel-shoppable-images-lite/core/common/class-widget.php:10
    • > PHP Notice
      Undefined variable: model in wp-content/plugins/mabel-shoppable-images-lite/code/views/shoppable-image.php on line 7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/mabel-shoppable-images-lite/core/views/widget_form.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #4 in mabel-shoppable-images-lite/assets to your readme.txt
  • Screenshots: Add an image for screenshot #14 (Example of how it could look on your website.)
The official readme.txt might help

mabel-shoppable-images-lite/mabel-shoppable-images-lite.php 92% from 13 tests

Analyzing the main PHP file in "Shoppable Images" version 1.2.5
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.7" instead of "3.6.0")

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
Success! There were no dangerous files found in this plugin1,959 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP544753381,919
JavaScript20021
SVG10017
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.41
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes00.00%
Methods109
▷ Static methods1816.51%
▷ Public methods9788.99%
▷ Protected methods00.00%
▷ Private methods1211.01%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin