77% shop-assistant-for-woocommerce-jarvis

Code Review | Floating Buttons for WooCommerce

WordPress plugin Floating Buttons for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: shop-assistant-fo...
  • Plugin version: 2.8.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jan 13, 2017
  • Latest release: Oct 23, 2023
  • Number of updates: 53
  • Update frequency: every 46.6 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /6,912 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.14ms] Passed 4 tests

Analyzing server-side resources used by Floating Buttons for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.66 ▼0.39
Dashboard /wp-admin3.31 ▲0.0146.20 ▼3.36
Posts /wp-admin/edit.php3.36 ▲0.0144.61 ▼1.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.09 ▼14.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.34 ▲1.76
Support /wp-admin/admin.php?page=qc_jarvis_supports3.0122.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 245 new files
Database: no new tables, 45 new options
New WordPress options
position_x
user_from_title
jarvis_icon
cart_total_price
can_compress_scripts
jarvis_mode
db_upgraded
sell_notification_off_mobile
cart_no_product_found
notification_delay_one
...

Browser metrics Passed 4 tests

An overview of browser requirements for Floating Buttons for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.33 ▼0.391.68 ▲0.1340.16 ▲1.34
Dashboard /wp-admin2,195 ▲185.56 ▼0.0882.64 ▼5.7738.91 ▼2.82
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0133.19 ▼1.8832.47 ▼6.38
Add New Post /wp-admin/post-new.php1,526 ▼023.72 ▲0.62655.88 ▼11.2664.25 ▲4.49
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0297.66 ▲1.1842.50 ▼1.85
Support /wp-admin/admin.php?page=qc_jarvis_supports280.420.093.80

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 45 options in the database
    • jarvis_form_animation
    • last_sold_from
    • last_sold_just_purchased
    • last_sold_product_title
    • global_fake_sale_delay_time
    • cart_total_price
    • fake_sale_notification_sound
    • jarvis_support_form_title
    • global_notification_delay_time
    • position_y
    • ...

Smoke tests 50% 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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/shop-assistant-for-woocommerce-jarvis/qc-support-promo-page/class-qc-support-promo-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shop-assistant-for-woocommerce-jarvis/class-qc-free-plugin-upgrade-notice.php:34

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=qc_jarvis_supports
    • > Network (severe)
    wp-admin/admin.php?page=qc_jarvis_supports - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

shop-assistant-for-woocommerce-jarvis/jarvis-woo.php 85% from 13 tests

The main PHP script in "Floating Buttons for WooCommerce" version 2.8.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("shop-assistant-for-woocommerce-jarvis.php" instead of "jarvis-woo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected58,343 lines of code in 118 files:
LanguageFilesBlank linesComment linesLines of code
CSS272,18741930,057
JavaScript714,2853,05720,557
PHP161,1185014,752
SVG4002,977

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity37.60
▷ Minimum class complexity4.00
▷ Maximum class complexity213.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods60
▷ Static methods813.33%
▷ Public methods5998.33%
▷ Protected methods00.00%
▷ Private methods11.67%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
73 PNG files occupy 1.11MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
qc-support-promo-page/images/icon-pack/service-08.png2.54KB1.42KB▼ 44.28%
images/widget-reset.png1.09KB0.36KB▼ 66.67%
qc-support-promo-page/images/express-shop.png41.74KB15.12KB▼ 63.78%
qc-support-promo-page/images/highlight.png16.86KB6.57KB▼ 61.02%
images/icon-7.png3.19KB1.46KB▼ 54.21%