CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function insert has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

  Element.Methods.insert = function(element, insertions) {
    element = $(element);

    if (Object.isString(insertions) || Object.isNumber(insertions) ||
        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 3 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 Hash has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

var Hash = Class.create(Enumerable, (function() {
  if (function() {
    var i = 0, Test = function(value) { this.key = value };
    Test.prototype.key = 'foo';
    for (var property in new Test('bar')) i++;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 3 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 autosave_parse_response has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function autosave_parse_response(response) {
    var res = wpAjax.parseAjaxResponse(response, 'autosave'), message = '', postID, sup, url;

    if ( res && res.responses && res.responses.length ) {
        message = res.responses[0].data; // The saved message or error.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/autosave.dev.js - About 3 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 insert has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

  Element.Methods.insert = function(element, insertions) {
    element = $(element);

    if (Object.isString(insertions) || Object.isNumber(insertions) ||
        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 3 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 Hash has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

var Hash = Class.create(Enumerable, (function() {
  if (function() {
    var i = 0, Test = function(value) { this.key = value };
    Test.prototype.key = 'foo';
    for (var property in new Test('bar')) i++;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 3 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 single_row has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function single_row( $theme ) {
        global $status, $page, $s, $totals;

        $context = $status;

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

function wp_dashboard_incoming_links_output() {
    $widgets = get_option( 'dashboard_widget_options' );
    @extract( @$widgets['dashboard_incoming_links'], EXTR_SKIP );
    $rss = fetch_feed( $url );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.php - About 3 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 _data_prepare has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function _data_prepare($mode=FTP_ASCII) {
        if(!$this->_settype($mode)) return FALSE;
        $this->SendMSG("Creating data socket");
        $this->_ftp_data_sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
        if ($this->_ftp_data_sock < 0) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp-sockets.php - About 3 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 posts2wp has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function posts2wp($posts='')
    {
        // General Housekeeping
        global $wpdb;
        $count = 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php - About 3 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 posts2wp has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function posts2wp($posts='')
    {
        // General Housekeeping
        global $wpdb;
        $count = 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/dotclear.php - About 3 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 update_object_term_cache has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function update_object_term_cache($object_ids, $object_type) {
    if ( empty($object_ids) )
        return;

    if ( !is_array($object_ids) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 3 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 sanitize_term_field has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
    if ( 'parent' == $field  || 'term_id' == $field || 'count' == $field || 'term_group' == $field ) {
        $value = (int) $value;
        if ( $value < 0 )
            $value = 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 3 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 FreeFormatFrameLength has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    public function FreeFormatFrameLength($offset, $deepscan=false) {
        $info = &$this->getid3->info;

        fseek($this->getid3->fp, $offset, SEEK_SET);
        $MPEGaudioData = fread($this->getid3->fp, 32768);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 3 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 MultiByteCharString2HTML has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    public static function MultiByteCharString2HTML($string, $charset='ISO-8859-1') {
        $string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string
        $HTMLstring = '';

        switch ($charset) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php - About 3 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 update_callback has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function update_callback( $widget_args = 1 ) {
        global $wp_registered_widgets;

        if ( is_numeric($widget_args) )
            $widget_args = array( 'number' => $widget_args );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/widgets.php - About 3 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_list_categories has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function wp_list_categories( $args = '' ) {
    $defaults = array(
        'show_option_all' => '', 'orderby' => 'name',
        'order' => 'ASC', 'show_last_update' => 0,
        'style' => 'list', 'show_count' => 0,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/category-template.php - About 3 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 shortcode has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function shortcode( $attr, $url = '' ) {
        global $post;

        if ( empty($url) )
            return '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 3 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 shortcode has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

    function shortcode( $attr, $url = '' ) {
        $post = get_post();

        if ( empty( $url ) )
            return '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-embed.php - About 3 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_notify_postauthor has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function wp_notify_postauthor($comment_id, $comment_type='') {
    $comment = get_comment($comment_id);
    $post    = get_post($comment->comment_post_ID);
    $user    = get_userdata( $post->post_author );
    $current_user = wp_get_current_user();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 3 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 auth_redirect has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
Open

function auth_redirect() {
    // Checks if a user is logged in, if not redirects them to the login page

    if ( is_ssl() || force_ssl_admin() )
        $secure = true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 3 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

Severity
Category
Status
Source
Language