Sort Query Posts Security & Risk Analysis

wordpress.org/plugins/sort-query-posts

Sort posts on-the-fly without making a new SQL query

100 active installs v1.1 PHP + WP 2.5+ Updated Sep 4, 2012
order_bypostqueryreordersort
85
A · Safe
CVEs total0
Unpatched0
Last CVENever
Safety Verdict

Is Sort Query Posts Safe to Use in 2026?

Generally Safe

Score 85/100

Sort Query Posts has no known CVEs and is actively maintained. It's a solid choice for most WordPress installations.

No known CVEs Updated 13yr ago
Risk Assessment

The "sort-query-posts" v1.1 plugin exhibits a strong security posture in several key areas. Static analysis reveals a remarkably small attack surface with zero identified entry points, meaning there are no exposed AJAX handlers, REST API routes, shortcodes, or cron events that could be directly triggered by an attacker. Furthermore, all identified SQL queries utilize prepared statements, and all output is properly escaped, significantly mitigating risks of SQL injection and cross-site scripting (XSS). The absence of file operations and external HTTP requests further reduces potential vulnerabilities.

However, a significant concern arises from the presence of the `create_function` dangerous function. While the taint analysis found no unsanitized flows, the use of `create_function` is a deprecated and inherently risky practice that can lead to code injection vulnerabilities if not handled with extreme care, even if no such flows are currently detected. The plugin also lacks nonce and capability checks, which, given the limited attack surface, might not present an immediate risk but would be crucial if any new entry points were introduced or if the plugin's functionality expanded.

The vulnerability history is clean, with no known CVEs, which is a positive indicator. This, combined with the strong adherence to prepared statements and output escaping, suggests a developer who understands fundamental web security principles. Nevertheless, the use of `create_function` remains a notable weakness that warrants attention and ideally, refactoring. The overall risk is low, primarily due to the limited attack surface and good practices in SQL and output handling, but the presence of a dangerous function prevents a perfect score.

Key Concerns

  • Use of dangerous function create_function
  • Missing nonce checks
  • Missing capability checks
Vulnerabilities
None known

Sort Query Posts Security Vulnerabilities

No known vulnerabilities — this is a good sign.
Code Analysis
Analyzed Mar 16, 2026

Sort Query Posts Code Analysis

Dangerous Functions
1
Raw SQL Queries
0
0 prepared
Unescaped Output
0
0 escaped
Nonce Checks
0
Capability Checks
0
File Operations
0
External Requests
0
Bundled Libraries
0

Dangerous Functions Found

create_functionusort($wp_query->posts, create_function('$o1, $o2', $props[$order_by]));sort-query-posts.php:57
Attack Surface

Sort Query Posts Attack Surface

Entry Points0
Unprotected0
Maintenance & Trust

Sort Query Posts Maintenance & Trust

Maintenance Signals

WordPress version tested3.4.2
Last updatedSep 4, 2012
PHP min version
Downloads12K

Community Trust

Rating100/100
Number of ratings3
Active installs100
Developer Profile

Sort Query Posts Developer Profile

Tubal

2 plugins · 400 total installs

84
trust score
Avg Security Score
85/100
Avg Patch Time
30 days
View full developer profile
Detection Fingerprints

How We Detect Sort Query Posts

Patterns used to identify this plugin on WordPress sites during automated security audits and web crawling.

Asset Fingerprints

Asset Paths
/wp-content/plugins/sort-query-posts/style.css
Version Parameters
sort-query-posts/style.css?ver=

HTML / DOM Fingerprints

FAQ

Frequently Asked Questions about Sort Query Posts