CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function widget has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function widget($args, $instance) {

        if ( isset($instance['error']) && $instance['error'] )
            return;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/default-widgets.php - About 1 hr to fix

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 append has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function append($el, $text) {
        if (!$el) {
            return;
        }
        if ( $this->current_namespace )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 1 hr to fix

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_validate_auth_cookie has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_validate_auth_cookie($cookie = '', $scheme = '') {
    if ( ! $cookie_elements = wp_parse_auth_cookie($cookie, $scheme) ) {
        do_action('auth_cookie_malformed', $cookie, $scheme);
        return false;
    }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 1 hr to fix

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 __destruct has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function __destruct()
    {
        if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode'))
        {
            if (!empty($this->data['items']))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

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 body has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function body(&$array)
    {
        foreach ($array as $key => $value)
        {
            if ($this->checked_feeds === $this->max_checked_feeds)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

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_text_diff has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_text_diff( $left_string, $right_string, $args = null ) {
    $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
    $args = wp_parse_args( $args, $defaults );

    if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 1 hr to fix

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 extension has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function extension(&$array)
    {
        foreach ($array as $key => $value)
        {
            if ($this->checked_feeds === $this->max_checked_feeds)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

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 split_ns has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function split_ns($string)
    {
        static $cache = array();
        if (!isset($cache[$string]))
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

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_specialchars has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
    $string = (string) $string;

    if ( 0 === strlen( $string ) ) {
        return '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

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_attachment_link has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_attachment_link($id = false) {
    global $post, $wp_rewrite;

    $link = false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 1 hr to fix

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_boundary_post has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_boundary_post($in_same_cat = false, $excluded_categories = '', $start = true) {
    global $post, $wpdb;

    if ( empty($post) || !is_single() || is_attachment() )
        return null;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 1 hr to fix

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_dropdown_users has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_dropdown_users( $args = '' ) {
    global $wpdb;
    $defaults = array(
        'show_option_all' => '', 'show_option_none' => '',
        'orderby' => 'display_name', 'order' => 'ASC',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 1 hr to fix

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_signon has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_signon( $credentials = '', $secure_cookie = '' ) {
    if ( empty($credentials) ) {
        if ( ! empty($_POST['log']) )
            $credentials['user_login'] = $_POST['log'];
        if ( ! empty($_POST['pwd']) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 1 hr to fix

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_usermeta has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_usermeta( $user_id, $meta_key = '') {
    global $wpdb;
    $user_id = (int) $user_id;

    if ( !$user_id )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 1 hr to fix

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 send_through_proxy has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function send_through_proxy( $uri ) {
        // parse_url() only handles http, https type URLs, and will emit E_WARNING on failure.
        // This will be displayed on blogs, which is not reasonable.
        $check = @parse_url($uri);

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 1 hr to fix

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_page_templates has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_page_templates( $post = null ) {
        // If you screw up your current theme and we invalidate your parent, most things still work. Let it slide.
        if ( $this->errors() && $this->errors()->get_error_codes() !== array( 'theme_parent_invalid' ) )
            return array();

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 1 hr to fix

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_user_settings has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_user_settings() {

    if ( ! is_admin() )
        return;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 1 hr to fix

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 wptexturize has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wptexturize($text) {
    global $wp_cockneyreplace;
    static $static_setup = false, $opening_quote, $closing_quote, $default_no_texturize_tags, $default_no_texturize_shortcodes, $static_characters, $static_replacements, $dynamic_characters, $dynamic_replacements;
    $output = '';
    $curl = '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

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 block_request has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function block_request($uri) {
        // We don't need to block requests, because nothing is blocked.
        if ( ! defined( 'WP_HTTP_BLOCK_EXTERNAL' ) || ! WP_HTTP_BLOCK_EXTERNAL )
            return false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 1 hr to fix

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_attachment_template has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_attachment_template() {
    global $posts;

    if ( ! empty( $posts ) && isset( $posts[0]->post_mime_type ) ) {
        $type = explode( '/', $posts[0]->post_mime_type );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/template.php - About 1 hr to fix

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

Severity
Category
Status
Source
Language