CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function atom_03_construct_type has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function atom_03_construct_type($attribs)
    {
        if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64'))
        {
            $mode = SIMPLEPIE_CONSTRUCT_BASE64;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 value has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function value()
    {
        if ($this->is_linear_whitespace())
        {
            $this->linear_whitespace();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function parse($date)
    {
        foreach ($this->user as $method)
        {
            if (($returned = call_user_func($method, $date)) !== false)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 image has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function image()
    {
        if (substr($this->file->body, 0, 6) === 'GIF87a'
            || substr($this->file->body, 0, 6) === 'GIF89a')
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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_copyright has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function get_copyright()
    {
        if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
        {
            return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0]));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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_copyright has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function get_copyright()
    {
        if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
        {
            return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0]));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 utf8_bad_replace has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function utf8_bad_replace($str)
    {
        if (function_exists('iconv') && ($return = @iconv('UTF-8', 'UTF-8//IGNORE', $str)))
        {
            return $return;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 is_feed has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function is_feed(&$file)
    {
        if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE)
        {
            $sniffer =& new $this->content_type_sniffer_class($file);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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_image_title has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function get_image_title()
    {
        if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title'))
        {
            return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 error has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function error($message, $level, $file, $line)
    {
        if ((ini_get('error_reporting') & $level) > 0)
        {
            switch ($level)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 25 mins 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 delete_site_option has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function delete_site_option( $option ) {
    global $wpdb;

    // ms_protect_special_option( $option ); @todo

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 25 mins 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 clean_url has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function clean_url( $url, $protocols = null, $context = 'display' ) {
    $original_url = $url;

    if ('' == $url) return $url;
    $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 25 mins 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 _deep_replace has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function _deep_replace($search, $subject){
    $found = true;
    while($found) {
        $found = false;
        foreach( (array) $search as $val ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 25 mins 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_unregister_GLOBALS has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_unregister_GLOBALS() {
    if ( !ini_get( 'register_globals' ) )
        return;

    if ( isset( $_REQUEST['GLOBALS'] ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/load.php - About 25 mins 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_blogaddress_by_name has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_blogaddress_by_name( $blogname ) {
    if ( is_subdomain_install() ) {
        if ( $blogname == 'main' )
            $blogname = 'www';
        $url = rtrim( network_home_url(), '/' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.php - About 25 mins 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 enqueue_scripts has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function enqueue_scripts() {
        wp_enqueue_script('word-count');

        if ( self::$has_tinymce )
            wp_enqueue_script('editor');
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 25 mins 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 remove_all_filters has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function remove_all_filters($tag, $priority = false) {
    global $wp_filter, $merged_filters;

    if( isset($wp_filter[$tag]) ) {
        if( false !== $priority && isset($$wp_filter[$tag][$priority]) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/plugin.php - About 25 mins 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 parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function parse() {
        // first remove the XML declaration
        // this method avoids the RAM usage of preg_replace on very large messages
        $header = preg_replace( '/<\?xml.*?\?'.'>/', '', substr( $this->message, 0, 100 ), 1 );
        $this->message = substr_replace($this->message, $header, 0, 100);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 25 mins 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 test has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function test( $args = array() ) {
        if ( ! function_exists( 'curl_init' ) || ! function_exists( 'curl_exec' ) )
            return false;

        $is_ssl = isset( $args['ssl'] ) && $args['ssl'];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 25 mins 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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function initialize() {
        $this->user = new stdClass;

        if ( is_user_logged_in() ) {
            /* Populate settings we need for the menu based on the current user. */
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-admin-bar.php - About 25 mins 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