Showing 427 of 427 total issues
Avoid too many return
statements within this method. Open
return '"'.$ascii.'"';
Avoid too many return
statements within this method. Open
return $str;
Avoid too many return
statements within this method. Open
return mb_strtoupper( $str, $charset );
Avoid too many return
statements within this method. Open
return $wpfs->get_contents( $filename );
Avoid too many return
statements within this method. Open
return $this->substr( $file, $offset, $maxlen );
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
if ( $mod_enable ) return $this->do_load_module( $mod );
Avoid too many return
statements within this method. Open
return strtoupper( $str );
Avoid too many return
statements within this method. Open
return mb_strtolower( $str, $charset );
Avoid too many return
statements within this method. Open
return strtolower( $str );
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $cache[ $item . $type ];
Avoid too many return
statements within this method. Open
if ( $this->options[ $field ] == 'sel' ) return false;
Avoid too many return
statements within this method. Open
if ( $nodefaults ) return false;
Avoid too many return
statements within this method. Open
return $defaults[ $item ];
Avoid too many return
statements within this method. Open
return false;
Function apply_tax_title_format
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function apply_tax_title_format( $category_name, $category_description, $tax = '' ) {
if ( empty( $tax ) ) $tax = get_query_var( 'taxonomy' );
$title_format = $this->get_tax_title_format( $tax );
$title = str_replace( '%taxonomy_title%', $category_name, $title_format );
if ( strpos( $title, '%taxonomy_description%' ) !== false ) $title = str_replace( '%taxonomy_description%', $category_description, $title );
- 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
Function get_paged
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function get_paged( $link ) {
global $wp_rewrite;
$page = $this->get_page_number();
$page_name = 'page';
if ( !empty( $wp_rewrite ) && !empty( $wp_rewrite->pagination_base ) ) $page_name = $wp_rewrite->pagination_base;
- 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
Function aioseop_load_json_services
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function aioseop_load_json_services() {
static $services_json = null;
if ( $services_json ) return $services_json;
if ( !class_exists( 'Services_JSON' ) ) require_once( 'JSON.php' );
if ( !$services_json ) $services_json = new Services_JSON();
- 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
Function aioseop_list_pages
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function aioseop_list_pages( $content ) {
global $wp_version;
$matches = array();
if ( preg_match_all( '/<li class="page_item page-item-(\d+)/i', $content, $matches ) ) {
update_postmeta_cache( array_values( $matches[1] ) );
- 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"