CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function viewportOffset has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  viewportOffset: function(forElement) {
    var valueT = 0, valueL = 0;

    var element = forElement;
    do {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 55 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 positionedOffset has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  positionedOffset: function(element) {
    var valueT = 0, valueL = 0;
    do {
      valueT += element.offsetTop  || 0;
      valueL += element.offsetLeft || 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 55 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 replace has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  Element.Methods.replace = function(element, content) {
    element = $(element);

    if (content && content.toElement) content = content.toElement();
    if (Object.isElement(content)) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/prototype.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

  initialize: function(element) {
    var defaults = {
      handle: false,
      reverteffect: function(element, top_offset, left_offset) {
        var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.js - About 55 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 privAddList has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
  {
    $v_result=1;

    // ----- Add the files
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 55 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 themes_api has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function themes_api($action, $args = null) {

    if ( is_array($args) )
        $args = (object)$args;

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

function wp_dashboard_recent_drafts( $drafts = false ) {
    if ( !$drafts ) {
        $drafts_query = new WP_Query( array(
            'post_type' => 'post',
            'post_status' => 'draft',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.php - About 55 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 sort_menu has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function sort_menu($a, $b) {
        global $menu_order, $default_menu_order;
        $a = $a[2];
        $b = $b[2];
        if ( isset($menu_order[$a]) && !isset($menu_order[$b]) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/menu.php - About 55 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 after has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function after() {
        if ( empty($this->upgrader->result['destination_name']) )
            return;

        $theme_info = $this->upgrader->theme_info();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php - About 55 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 media_upload_form has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function media_upload_form( $errors = null ) {
    global $type, $tab;

    $flash_action_url = admin_url('async-upload.php');

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

    function prepare_items() {
        $themes = wp_get_themes( array( 'allowed' => true ) );

        if ( ! empty( $_REQUEST['s'] ) )
            $this->search_terms = array_unique( array_filter( array_map( 'trim', explode( ',', strtolower( wp_unslash( $_REQUEST['s'] ) ) ) ) ) );

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

    function _data_read($mode=FTP_ASCII, $fp=NULL) {
        if(is_resource($fp)) $out=0;
        else $out="";
        if(!$this->_passive) {
            $this->SendMSG("Only passive connections available!");
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp-pure.php - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

    function error($error) {
        if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
            $this->error = $this->upgrader->strings[$error];

        if ( is_wp_error($error) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php - About 55 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 connect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function connect() {
        if ( ! $this->keys ) {
            $this->link = @ssh2_connect($this->options['hostname'], $this->options['port']);
        } else {
            $this->link = @ssh2_connect($this->options['hostname'], $this->options['port'], $this->options['hostkey']);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php - About 55 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 after has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function after($title = '') {
        echo '</p></div>';
        if ( $this->error || ! $this->result ) {
            if ( $this->error )
                echo '<div class="error"><p>' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, $this->error) . '</p></div>';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader-skins.php - About 55 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 core_update_footer has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function core_update_footer( $msg = '' ) {
    if ( !current_user_can('manage_options') )
        return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] );

    $cur = get_preferred_from_update_core();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/update.php - About 55 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 fget has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function fget($fp, $remotefile,$rest=0) {
        if($this->_can_restore and $rest!=0) fseek($fp, $rest);
        $pi=pathinfo($remotefile);
        if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
        else $mode=FTP_BINARY;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 55 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 fput has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function fput($remotefile, $fp) {
        if($this->_can_restore and $rest!=0) fseek($fp, $rest);
        $pi=pathinfo($remotefile);
        if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
        else $mode=FTP_BINARY;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.php - About 55 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_hidden_meta_boxes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function get_hidden_meta_boxes( $screen ) {
    if ( is_string( $screen ) )
        $screen = convert_to_screen( $screen );

    $hidden = get_user_option( "metaboxhidden_{$screen->id}" );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 55 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_option has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function __get_option($setting) {
    global $wpdb;

    if ( $setting == 'home' && defined( 'WP_HOME' ) ) {
        return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 55 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