Showing 378 of 379 total issues
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$term'. Open
Open
<input id="in-ldp_container-<?php echo $term->term_id; ?>" type="radio" name="tax_input[ldp_container][]" value="<?php echo $term->term_id; ?>">
- Exclude checks
Using cURL functions is highly discouraged. Use wp_remote_get() instead. Open
Open
$ch = curl_init();
- Exclude checks
Array double arrow not aligned correctly; expected 8 space(s) between "'slug'" and double arrow, but found 1. Open
Open
'slug' => $term,
- Exclude checks
Detected usage of a non-sanitized input variable: $_SERVER Open
Open
$current_url = $_SERVER['REQUEST_URI'];
- Exclude checks
Resource version not set in call to wp_register_script(). This means new versions of the script will not always be loaded due to browser caching. Open
Open
wp_register_script(
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space Open
Open
$current_site = $response->{'@graph'}[0];
- Exclude checks
Array double arrow not aligned correctly; expected 1 space(s) between "'show_in_nav_menus'" and double arrow, but found 10. Open
Open
'show_in_nav_menus' => true,
- Exclude checks
In footer ($in_footer) is not set explicitly wp_register_script; It is recommended to load scripts in the footer. Please set this value to true
to load it in the footer, or explicitly false
if it should be loaded in the header. Open
Open
wp_register_script(
- Exclude checks
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'. Open
Open
echo "<p class='description'>" . __( 'The LDP-compatible JSON Model for this container', 'wpldp' ) . '</p></td>';
- Exclude checks
Array double arrow not aligned correctly; expected 6 space(s) between "'document'" and double arrow, but found 1. Open
Open
'document' => array(
- Exclude checks
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space Open
Open
$term_id = $term->term_id;
- Exclude checks
Resource version not set in call to wp_register_script(). This means new versions of the script will not always be loaded due to browser caching. Open
Open
wp_register_script(
- Exclude checks
Processing form data without nonce verification. Open
Open
$term_meta = $_POST['ldp_site_url'];
- Exclude checks
Detected usage of a non-validated input variable: $_GET Open
Open
if ( 'options-general.php' === $pagenow && 'wpldp' === $_GET['page'] ) { // change my-plugin to your plugin page.
- Exclude checks
In footer ($in_footer) is not set explicitly wp_register_script; It is recommended to load scripts in the footer. Please set this value to true
to load it in the footer, or explicitly false
if it should be loaded in the header. Open
Open
wp_register_script(
- Exclude checks
Expected type hint "{\WP_REST_Request}"; found "\WP_REST_Request" for $request Open
Open
public function add_new_site( \WP_REST_Request $request, \WP_REST_Response $response = null ) {
- Exclude checks
Expected 2 spaces after parameter type; 1 found Open
Open
* @param \WP_REST_Request $request The current HTTP request object.
- Exclude checks
Function container_meta_box_callback
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
function container_meta_box_callback( $post ) {
wp_nonce_field(
'wpldp_save_container_box_data',
'wpldp_container_box_nonce'
);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
No space after opening parenthesis is prohibited Open
Open
foreach ($outputs as $site_url => $output ) {
- Exclude checks
Array double arrow not aligned correctly; expected 5 space(s) between "'key'" and double arrow, but found 1. Open
Open
'key' => 'ldp_site_url',
- Exclude checks