Adds an AJAX rating system for your WordPress site's content.
Category Scores
Issues to Review
Prioritized issue groups from the latest Plugin Check scan
Security
472
9 issue groups
Maintainability
283
13 issue groups
I18n
46
3 issue groups
ERRORSecurityOutput is not escapedAll output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"<$start_tag $attributes data-nonce=\""'.320
- Category
- Security
- Occurrences
- 320
- Severity
- error
Sample message
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '"<$start_tag $attributes data-nonce=\""'.
WARNINGMaintainabilityNon-prefixed global variableGlobal variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$base_name".135
- Category
- Maintainability
- Occurrences
- 135
- Severity
- warning
Sample message
Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$base_name".
WARNINGSecurityInterpolated SQL is not preparedUse placeholders and $wpdb->prepare(); found interpolated variable $category_sql at "SELECT COUNT($wpdb->ratings.rating_postid) AS ratings_users, SUM($wpdb->ratings.rating_rating) AS ratings_score, ROUND(((SUM($wpdb->ratings.rating_rating)/COUNT($wpdb->ratings.rating_postid))), 2) AS ratings_average, $wpdb->posts.ID FROM $wpdb->posts LEFT JOIN $wpdb->ratings ON $wpdb->ratings.rating_postid = $wpdb->posts.ID INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) WHERE rating_timestamp >= $min_time AND $wpdb->posts.post_password = '' AND $wpdb->posts.post_date < NOW() AND $wpdb->posts.post_status = 'publish' AND $wpdb->term_taxonomy.taxonomy = 'category' AND $category_sql AND $where GROUP BY $wpdb->ratings.rating_postid ORDER BY $order_by DESC, ratings_users DESC LIMIT %d"52
- Category
- Security
- Occurrences
- 52
- Severity
- warning
Sample message
Use placeholders and $wpdb->prepare(); found interpolated variable $category_sql at "SELECT COUNT($wpdb->ratings.rating_postid) AS ratings_users, SUM($wpdb->ratings.rating_rating) AS ratings_score, ROUND(((SUM($wpdb->ratings.rating_rating)/COUNT($wpdb->ratings.rating_postid))), 2) AS ratings_average, $wpdb->posts.ID FROM $wpdb->posts LEFT JOIN $wpdb->ratings ON $wpdb->ratings.rating_postid = $wpdb->posts.ID INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) WHERE rating_timestamp >= $min_time AND $wpdb->posts.post_password = '' AND $wpdb->posts.post_date < NOW() AND $wpdb->posts.post_status = 'publish' AND $wpdb->term_taxonomy.taxonomy = 'category' AND $category_sql AND $where GROUP BY $wpdb->ratings.rating_postid ORDER BY $order_by DESC, ratings_users DESC LIMIT %d"
WARNINGMaintainabilityNon-prefixed functionFunctions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "add_ratings_fields".42
- Category
- Maintainability
- Occurrences
- 42
- Severity
- warning
Sample message
Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "add_ratings_fields".
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.40
- Category
- I18n
- Occurrences
- 40
- 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.39
- Category
- Maintainability
- Occurrences
- 39
- Severity
- warning
Sample message
Use of a direct database call is discouraged.
WARNINGMaintainabilityNon-prefixed hook nameHook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rate_post".26
- Category
- Maintainability
- Occurrences
- 26
- Severity
- warning
Sample message
Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "rate_post".
WARNINGSecurityRequest data is not unslashed$_COOKIE['comment_author_'.COOKIEHASH] not unslashed before sanitization. Use wp_unslash() or similar25
- Category
- Security
- Occurrences
- 25
- Severity
- warning
Sample message
$_COOKIE['comment_author_'.COOKIEHASH] not unslashed before sanitization. Use wp_unslash() or similar
WARNINGSecurityInput is not sanitizedDetected usage of a non-sanitized input variable: $_COOKIE['comment_author_'.COOKIEHASH]22
- Category
- Security
- Occurrences
- 22
- Severity
- warning
Sample message
Detected usage of a non-sanitized input variable: $_COOKIE['comment_author_'.COOKIEHASH]
ERRORSecurityDatabase parameter is not escapedUnescaped parameter $post_ids used in $wpdb->query()\n$post_ids assigned unsafely at line 71.21
- Category
- Security
- Occurrences
- 21
- Severity
- error
Sample message
Unescaped parameter $post_ids used in $wpdb->query()\n$post_ids assigned unsafely at line 71.
Show 15 moreShow less
WARNINGMaintainabilityNo Caching21
- Category
- Maintainability
- Occurrences
- 21
- Severity
- warning
Sample message
Direct database call without caching detected. Consider using wp_cache_get() / wp_cache_set() or wp_cache_delete().
ERRORSecuritySQL query is not prepared19
- Category
- Security
- Occurrences
- 19
- Severity
- error
Sample message
Use placeholders and $wpdb->prepare(); found $post_ids
WARNINGSecurityInput is not validated8
- Category
- Security
- Occurrences
- 8
- Severity
- warning
Sample message
Detected usage of a possibly undefined superglobal array index: $_POST['postratings_template_highestrated']. Check that the array index exists before using it.
ERRORMaintainabilitystrip tags strip tags6
- Category
- Maintainability
- Occurrences
- 6
- Severity
- error
Sample message
strip_tags() is discouraged. Use the more comprehensive wp_strip_all_tags() instead.
ERRORI18nUnordered Placeholders Text5
- Category
- I18n
- Occurrences
- 5
- Severity
- error
Sample message
Multiple placeholders in translatable strings should be ordered. Expected "%1$s, %2$s", but got "%s, %s" in '%s @ %s'.
WARNINGMaintainabilitySchema Change3
- Category
- Maintainability
- Occurrences
- 3
- Severity
- warning
Sample message
Attempting a database schema change is discouraged.
WARNINGMaintainabilityNon-prefixed class3
- Category
- Maintainability
- Occurrences
- 3
- Severity
- warning
Sample message
Classes declared by a theme/plugin should start with the theme/plugin prefix. Found: "WPPostRatingsAdmin".
ERRORSecurityUnsafe printing function3
- Category
- Security
- Occurrences
- 3
- Severity
- error
Sample message
All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
WARNINGMaintainabilitytrademarked term3
- Category
- Maintainability
- Occurrences
- 3
- Severity
- warning
Sample message
The plugin name includes a restricted term. Your chosen plugin name - "WP-PostRatings" - contains the restricted term "wp" which cannot be used at all in your plugin name.
WARNINGSecurityNonce verification recommended2
- Category
- Security
- Occurrences
- 2
- Severity
- warning
Sample message
Processing form data without nonce verification.
ERRORMaintainabilityDeprecated function: wp_get_sites2
- Category
- Maintainability
- Occurrences
- 2
- Severity
- error
Sample message
wp_get_sites() has been deprecated since WordPress version 4.6.0. Use get_sites() instead.
WARNINGI18nDiscouraged text-domain loading1
- Category
- I18n
- Occurrences
- 1
- Severity
- warning
Sample message
load_plugin_textdomain() has been discouraged since WordPress version 4.6. When your plugin is hosted on WordPress.org, you no longer need to manually include this function call for translations under your plugin slug. WordPress will automatically load the translations for you as needed.
WARNINGMaintainabilityNon-prefixed constant1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- warning
Sample message
Global constants defined by a theme/plugin should start with the theme/plugin prefix. Found: "WP_POSTRATINGS_VERSION".
ERRORMaintainabilityfile system operations fclose1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().
ERRORMaintainabilityfile system operations fopen1
- Category
- Maintainability
- Occurrences
- 1
- Severity
- error
Sample message
File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fopen().
External Connections
Not analyzed yet.
Score History
First score snapshot
v1.91.2
29
Latest
- Findings
- 809
- Errors
- 425
- Warnings
- 384
- Check
- 2.0.0
| Scan | Score | Findings | Errors | Warnings | Plugin | Check |
|---|---|---|---|---|---|---|
| Latest | 29 | 809 | 425 | 384 | v1.91.2 | 2.0.0 |
Relationship Map
Author, categories, issues, domains, and nearby plugins.