Showing 5,566 of 7,504 total issues
Avoid deeply nested control flow statements. Open
if (isset($category['attribs']['']['label']))
{
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT);
}
Avoid deeply nested control flow statements. Open
if (!mysql_query($sql, $this->mysql))
{
return false;
}
Avoid deeply nested control flow statements. Open
if (isset($category['data']))
{
$term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT);
}
Avoid deeply nested control flow statements. Open
while ($row = mysql_fetch_row($query))
{
$existing_ids[] = $row[0];
}
Avoid deeply nested control flow statements. Open
if (count($attribs[$j]) === 2)
{
$attribs[$j][2] = $attribs[$j][1];
}
Avoid deeply nested control flow statements. Open
switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data']))
{
case '0':
$this->data['type'] &= SIMPLEPIE_TYPE_RSS_091_NETSCAPE;
break;
Avoid deeply nested control flow statements. Open
if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)))
{
if ($cache->save(array('headers' => $file->headers, 'body' => $file->body)))
{
$img['attribs']['src']['data'] = $this->image_handler . $image_url;
Avoid deeply nested control flow statements. Open
if (($body = gzinflate($this->body)) === false)
{
$this->error = 'Unable to decode HTTP "deflate" stream';
$this->success = false;
}
Avoid deeply nested control flow statements. Open
if (!($date = $prepared[1][$new_id]->get_date('U')))
{
$date = time();
}
Avoid deeply nested control flow statements. Open
if (!mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(' . $feed_id . ', \'' . mysql_real_escape_string($new_id) . '\', \'' . mysql_real_escape_string(serialize($prepared[1][$new_id]->data)) . '\', ' . $date . ')', $this->mysql))
{
return false;
}
Function is_allowed
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function is_allowed( $check = 'both', $blog_id = null ) {
if ( ! is_multisite() )
return true;
if ( 'both' == $check || 'network' == $check ) {
- 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
Avoid deeply nested control flow statements. Open
if ( $file && file_exists( "$template_dir/$file" ) )
$mce_css[] = "$template_uri/$file";
Avoid deeply nested control flow statements. Open
if ( @is_file( $path . $mce_locale . '_dlg.js' ) )
$strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n";
Avoid deeply nested control flow statements. Open
if ( 'en' != $mce_locale && empty( $strings ) ) {
if ( @is_file( $path . 'en.js' ) ) {
$str1 = @file_get_contents( $path . 'en.js' );
$strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
}
Function print_scripts_l10n
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function print_scripts_l10n( $handle, $echo = true ) {
if ( empty($this->registered[$handle]->extra['l10n']) || empty($this->registered[$handle]->extra['l10n'][0]) || !is_array($this->registered[$handle]->extra['l10n'][1]) )
return false;
$object_name = $this->registered[$handle]->extra['l10n'][0];
- 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 is_serialized
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function is_serialized( $data ) {
// if it isn't a string, it isn't serialized
if ( !is_string( $data ) )
return false;
$data = trim( $data );
- 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
Method get_archives
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
Function delete_usermeta
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
global $wpdb;
if ( !is_numeric( $user_id ) )
return false;
$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
- 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 wp_debug_mode
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function wp_debug_mode() {
if ( WP_DEBUG ) {
error_reporting( E_ALL );
if ( WP_DEBUG_DISPLAY )
- 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
Avoid deeply nested control flow statements. Open
if ( @is_file( $path . $mce_locale . '.js' ) )
$strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n";