CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function add_enclosure_if_new has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function add_enclosure_if_new($post_ID, $enclosure) {
        if( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {

            $encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'];
            $found = false;
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs 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 mw_getRecentPosts has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function mw_getRecentPosts($args) {

        $this->escape($args);

        $blog_ID     = (int) $args[0];
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.php - About 2 hrs 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 CleanUp has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    private function CleanUp() {

        // remove possible empty keys
        $AVpossibleEmptyKeys = array('dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate');
        foreach ($AVpossibleEmptyKeys as $dummy => $key) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 2 hrs 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 saveAttachment has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public function saveAttachment($name, $offset, $length, $image_mime=null) {
        try {

            // do not extract at all
            if ($this->getid3->option_save_attachments === getID3::ATTACHMENTS_NONE) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.php - About 2 hrs 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 HandleEMBLClusterBlock has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    private function HandleEMBLClusterBlock($element, $block_type, &$info) {
        // http://www.matroska.org/technical/specs/index.html#block_structure
        // http://www.matroska.org/technical/specs/index.html#simpleblock_structure

        $block_data = array();

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

function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
    global $wpdb;
    $null = null;

    if ( empty($post) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 2 hrs 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_delete_post has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

function wp_delete_post( $postid = 0, $force_delete = false ) {
    global $wpdb, $wp_rewrite;

    if ( !$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) )
        return $post;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 2 hrs 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 uncomment_rfc822 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public static function uncomment_rfc822($string)
    {
        $string = (string) $string;
        $position = 0;
        $length = strlen($string);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 2 hrs 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_rfc2822_comments has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    public function remove_rfc2822_comments($string)
    {
        $string = (string) $string;
        $position = 0;
        $length = strlen($string);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php - About 2 hrs 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_taxonomies has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

function get_attachment_taxonomies($attachment) {
    if ( is_int( $attachment ) )
        $attachment = get_post($attachment);
    else if ( is_array($attachment) )
        $attachment = (object) $attachment;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 2 hrs 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 widget has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function widget($args, $instance) {
        $cache = wp_cache_get('widget_recent_posts', 'widget');

        if ( !is_array($cache) )
            $cache = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/default-widgets.php - About 2 hrs 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_w3cdtf has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

function parse_w3cdtf ( $date_str ) {

    # regex to match wc3dtf
    $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/";

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rss.php - About 2 hrs 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 uncomment_rfc822 has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function uncomment_rfc822($string)
    {
        $string = (string) $string;
        $position = 0;
        $length = strlen($string);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs 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_type has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function get_type()
    {
        if (isset($this->file->headers['content-type']))
        {
            if (!isset($this->file->headers['content-encoding'])
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs 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_rfc2822_comments has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function remove_rfc2822_comments($string)
    {
        $string = (string) $string;
        $position = 0;
        $length = strlen($string);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs 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 mod_rewrite_rules has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

    function mod_rewrite_rules() {
        if ( ! $this->using_permalinks()) {
            return '';
        }

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rewrite.php - About 2 hrs 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_comment_class has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

function get_comment_class( $class = '', $comment_id = null, $post_id = null ) {
    global $comment_alt, $comment_depth, $comment_thread_alt;

    $comment = get_comment($comment_id);

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment-template.php - About 2 hrs 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_sprintf has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

function wp_sprintf( $pattern ) {
    $args = func_get_args( );
    $len = strlen($pattern);
    $start = 0;
    $result = '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 2 hrs 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 CreateHeader has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

  function CreateHeader() {
    $result = '';

    /* Set the boundaries */
    $uniq_id = md5(uniqid(time()));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 2 hrs 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

File thickbox.js has 274 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/thickbox/thickbox.js - About 2 hrs to fix
    Severity
    Category
    Status
    Source
    Language