CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    function escape(&$array) {
        global $wpdb;

        if(!is_array($array)) {
            return($wpdb->escape($array));
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.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 is_term has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function is_term($term, $taxonomy = '', $parent = 0) {
    global $wpdb;

    $select = "SELECT term_id FROM $wpdb->terms as t WHERE ";
    $tax_select = "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE ";
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.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_term_by has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw') {
    global $wpdb;

    if ( ! is_taxonomy($taxonomy) )
        return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.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 CalculateCompressionRatioVideo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function CalculateCompressionRatioVideo() {
        if (empty($this->info['video'])) {
            return false;
        }
        if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.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 readData has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function readData() {
        $value = null;

        $type = $this->stream->readByte();
        switch ($type) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.flv.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_post_types has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_post_types( $args = array(), $output = 'names' ) {
    global $wp_post_types;

    $do_names = false;
    if ( 'names' == $output )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.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_kses_check_attr_val has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_kses_check_attr_val($value, $vless, $checkname, $checkvalue) {
    $ok = true;

    switch (strtolower($checkname)) {
        case 'maxlen' :
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/kses.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_get_attachment_url has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function wp_get_attachment_url( $post_id = 0 ) {
    $post_id = (int) $post_id;
    if ( !$post =& get_post( $post_id ) )
        return false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.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

    public 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/SimplePie/Locator.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 parse_iri has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    protected function parse_iri($iri)
    {
        $iri = trim($iri, "\x20\x09\x0A\x0C\x0D");
        if (preg_match('/^((?P<scheme>[^:\/?#]+):)?(\/\/(?P<authority>[^\/?#]*))?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$/', $iri, $match))
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.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

    public 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/SimplePie/Locator.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 set_host has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function set_host($ihost)
    {
        if ($ihost === null)
        {
            $this->ihost = null;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.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 error has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public static 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/SimplePie/Misc.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_id has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_id($hash = false)
    {
        if (!$hash)
        {
            if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id'))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.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 ms_subdomain_constants has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function ms_subdomain_constants() {
    static $error = null;
    static $error_warn = false;

    if ( false === $error )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-default-constants.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 widget has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function widget( $args, $instance ) {
        global $wpdb, $comments, $comment;

        extract($args, EXTR_SKIP);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Comments') : $instance['title']);
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 parse_banner has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    function parse_banner ( $server_text ) {
        $outside = true;
        $banner = "";
        $length = strlen($server_text);
        for($count =0; $count < $length; $count++)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.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 init has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function init () {
    if ( defined('MAGPIE_INITALIZED') ) {
        return;
    }
    else {
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 get_attachment_icon has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
    $id = (int) $id;
    if ( !$post = & get_post($id) )
        return false;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-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_the_category_rss has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_the_category_rss($type = null) {
    if ( empty($type) )
        $type = get_default_feed();
    $categories = get_the_category();
    $tags = get_the_tags();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/feed.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