68% simile-for-woocommerce

Code Review | Simile for WooCommerce

WordPress plugin Simile for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: simile-for-woocom...
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Apr 12, 2019
  • Latest release: Jul 6, 2021
  • Number of updates: 46
  • Update frequency: every 17.8 days
  • Top authors: scopemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /885 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.21MB] [CPU: ▼11.28ms] 75% from 4 tests

Analyzing server-side resources used by Simile for WooCommerce
Please take the time to fix the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 908.80ms on /wp-admin/admin.php?page=simile-smart-bundles-config)
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5144.15 ▲5.57
Dashboard /wp-admin3.80 ▲0.4953.66 ▲0.14
Posts /wp-admin/edit.php3.85 ▲0.4959.22 ▲10.74
Add New Post /wp-admin/post-new.php3.63 ▼2.2544.28 ▼58.53
Media Library /wp-admin/upload.php3.66 ▲0.4343.73 ▲7.69
Customize Product /wp-admin/admin.php?page=simile-smart-bundles-customize3.6240.97
Smart Config /wp-admin/admin.php?page=simile-smart-bundles-config3.70908.80
Smile /wp-admin/admin.php?page=simile-for-woocommerce3.6238.90

Server storage [IO: ▲0.23MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: 2 new tables, 7 new options
New tables
wp_similie_product_detail
wp_postmeta_simile_backup
New WordPress options
can_compress_scripts
simile-for-woocommerce_shop_credentials
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Simile for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.24 ▼0.121.73 ▲0.0542.22 ▲1.50
Dashboard /wp-admin2,225 ▲485.58 ▼0.0892.87 ▲5.0842.61 ▲2.57
Posts /wp-admin/edit.php2,127 ▲271.98 ▼0.0236.65 ▲0.8342.79 ▲9.85
Add New Post /wp-admin/post-new.php1,558 ▲3222.91 ▼0.22683.12 ▼59.3652.64 ▼10.78
Media Library /wp-admin/upload.php1,424 ▲244.23 ▲0.02107.53 ▼1.1947.84 ▲3.00
Customize Product /wp-admin/admin.php?page=simile-smart-bundles-customize8221.8128.0427.32
Smart Config /wp-admin/admin.php?page=simile-smart-bundles-config1,1272.0524.5328.93
Smile /wp-admin/admin.php?page=simile-for-woocommerce1,24410.07299.5844.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 2 tables
    • wp_similie_product_detail
    • wp_postmeta_simile_backup
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • simile-for-woocommerce_shop_credentials
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 11× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/simile-for-woocommerce/simile-for-woocommerce.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-visual-search.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-related-products.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-smart-bundles-products-view.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-smart-bundles-admin-iframe.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-on-activation.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-smart-bundles-admin-settings.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-rest-api.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-admin.php
    • > /wp-content/plugins/simile-for-woocommerce/includes/simile-model.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=simile-smart-bundles-customize
    • > Network (severe)
    https://service.scopemedia.com/wp-bundle/admin/?shop=wp.com.22378-simile_wp&timestamp=1697483173&signature=c05b0b743d30b2d9b6d37a0a490734b26dacff8d6650d84d39f4005c8cc5d359 - Failed to load resource: the server responded with a status of 502 (Bad Gateway)

Optimizations

Plugin configuration Passed 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
10 plugin tags: similar, cross, upsell, woocommerce, cross-sell...

simile-for-woocommerce/simile-for-woocommerce.php Passed 13 tests

The principal PHP file in "Simile for WooCommerce" v. 1.0.6 is loaded by WordPress automatically on each request
111 characters long description:
Simile applies Deep Learning AI technology to discover & recommend visually related products to your customers.

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 detected3,860 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP123574012,321
JavaScript414586794
CSS310435745

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity26.64
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes19.09%
Methods108
▷ Static methods2624.07%
▷ Public methods8477.78%
▷ Protected methods00.00%
▷ Private methods2422.22%
Functions16
▷ Named functions00.00%
▷ Anonymous functions16100.00%
Constants12
▷ Global constants12100.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
PNG images were not found in this plugin