Total Sales Counts for WooCommerce

Build trust instantly. Display total sales counts on your products to leverage the power of social proof and skyrocket your store's conversion rates.

v4.1.0Shiva Shanker BhattaUpdated Added 700 installs96% rating
40
Score
121
Errors
62
Warnings
+0
Change

Category Scores

Security0
Repo100
Performance100
Maintainability74

Issues to Review

Prioritized issue groups from the latest Plugin Check scan

183 findings

Security

98

9 issue groups

Maintainability

43

8 issue groups

I18n

42

6 issue groups

ERRORSecuritySQL query is not preparedUse placeholders and $wpdb->prepare(); found $hpos_active29
Category
Security
Occurrences
29
Severity
error

Sample message

Use placeholders and $wpdb->prepare(); found $hpos_active

ERRORSecurityOutput is not escapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$awts_hide'.27
Category
Security
Occurrences
27
Severity
error

Sample message

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$awts_hide'.

ERRORI18nMissing Translators CommentA function call to __() with texts containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.20
Category
I18n
Occurrences
20
Severity
error

Sample message

A function call to __() with texts containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

WARNINGMaintainabilityDirect QueryUse of a direct database call is discouraged.18
Category
Maintainability
Occurrences
18
Severity
warning

Sample message

Use of a direct database call is discouraged.

WARNINGMaintainabilityNo CachingDirect database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().15
Category
Maintainability
Occurrences
15
Severity
warning

Sample message

Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().

ERRORSecurityDatabase parameter is not escapedUnescaped parameter $lookup_table used in $wpdb->get_row()\n$lookup_table assigned unsafely at line 67.13
Category
Security
Occurrences
13
Severity
error

Sample message

Unescaped parameter $lookup_table used in $wpdb->get_row()\n$lookup_table assigned unsafely at line 67.

WARNINGSecurityInterpolated SQL is not preparedUse placeholders and $wpdb->prepare(); found interpolated variable $ids_placeholder at "SELECT product_id, total_sales FROM {$wpdb->prefix}wc_product_meta_lookup WHERE product_id IN ($ids_placeholder)"11
Category
Security
Occurrences
11
Severity
warning

Sample message

Use placeholders and $wpdb->prepare(); found interpolated variable $ids_placeholder at "SELECT product_id, total_sales FROM {$wpdb->prefix}wc_product_meta_lookup WHERE product_id IN ($ids_placeholder)"

ERRORI18nText Domain MismatchMismatched text domain. Expected 'woo-total-sales' but got 'woocommerce'.8
Category
I18n
Occurrences
8
Severity
error

Sample message

Mismatched text domain. Expected 'woo-total-sales' but got 'woocommerce'.

ERRORSecurityUnsafe printing functionAll output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.7
Category
Security
Occurrences
7
Severity
error

Sample message

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.

WARNINGSecurityNonce verification recommendedProcessing form data without nonce verification.6
Category
Security
Occurrences
6
Severity
warning

Sample message

Processing form data without nonce verification.

Show 13 more
WARNINGMaintainabilityNon-prefixed hook name5
Category
Maintainability
Occurrences
5
Severity
warning

Sample message

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "active_plugins".

ERRORI18nNon Singular String Literal Plural5
Category
I18n
Occurrences
5
Severity
error

Sample message

The $plural parameter must be a single text string literal. Found: $plural

ERRORI18nNon Singular String Literal Single5
Category
I18n
Occurrences
5
Severity
error

Sample message

The $single parameter must be a single text string literal. Found: $singular

WARNINGSecurityRequest data is not unslashed3
Category
Security
Occurrences
3
Severity
warning

Sample message

$_POST['awts-custom-count'] not unslashed before sanitization. Use wp_unslash() or similar

ERRORI18nMissing Arg Domain2
Category
I18n
Occurrences
2
Severity
error

Sample message

Missing $domain parameter in function call to esc_html_e().

ERRORI18nUnordered Placeholders Text2
Category
I18n
Occurrences
2
Severity
error

Sample message

Multiple placeholders in translatable strings should be ordered. Expected "%1$d, %2$d", but got "%d, %d" in 'Please include %d at where you want to show the total sales number., e.g %d item sold'.

ERRORSecurityQuoted Dynamic Placeholder Generation1
Category
Security
Occurrences
1
Severity
error

Sample message

Dynamic placeholder generation should not have surrounding quotes.

WARNINGMaintainabilityNon-prefixed global variable1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$screen".

WARNINGSecurityInput is not sanitized1
Category
Security
Occurrences
1
Severity
warning

Sample message

Detected usage of a non-sanitized input variable: $_POST['awts_product_total_sales_metabox_nonce']

ERRORMaintainabilitystrip tags strip tags1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

strip_tags() is discouraged. Use the more comprehensive wp_strip_all_tags() instead.

WARNINGMaintainabilityMissing Version1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

Resource version not set in call to wp_register_style(). This means new versions of the style may not always be loaded due to browser caching.

ERRORMaintainabilityMissing direct file access protection1
Category
Maintainability
Occurrences
1
Severity
error

Sample message

PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit;

WARNINGMaintainabilitytrademarked term1
Category
Maintainability
Occurrences
1
Severity
warning

Sample message

The plugin slug includes a restricted term. Your plugin slug - "woo-total-sales" - contains the restricted term "woo" and cannot be used to begin your plugin slug. We disallow the use of certain terms in ways that are abused, or potentially infringe on and/or are misleading with regards to trademarks. You may use the term "woo" elsewhere in your plugin slug, such as "... for woo".

External Connections

Potential connections found in static code analysis.

5 domains

Outbound calls

5

External assets

1

Incoming endpoints

1

Notable Domains

woocommerce.com1 · outbound

Platform / Reference Domains

github.com2 · platform/reference
gnu.org1 · platform/reference
w3.org1 · platform/reference

External Asset Domains

Incoming Endpoints

No public endpoints detected.

Admin AJAX endpoints1
wp_ajax_awts_get_orders_archiveauthenticated

wp_ajax

Score History

First score snapshot

v4.1.0

40

Latest

Findings
183
Errors
121
Warnings
62
Check
2.0.0

Relationship Map

Author, categories, issues, domains, and nearby plugins.

30 nodes

Related Plugins