CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function scroll has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  scroll: function() {
    var current = new Date();
    var delta = current - this.lastScrolled;
    this.lastScrolled = current;
    if(this.options.scroll == window) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.js - 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 duplicate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

  function duplicate($p_archive)
  {
    $v_result = 1;

    // ----- Reset the error handler
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.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 _list has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function _list($arg="", $cmd="LIST", $fnction="_list") {
        if(!$this->_data_prepare()) return false;
        if(!$this->_exec($cmd.$arg, $fnction)) {
            $this->_data_close();
            return FALSE;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp.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_dashboard_rss_control has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) {
    if ( !$widget_options = get_option( 'dashboard_widget_options' ) )
        $widget_options = array();

    if ( !isset($widget_options[$widget_id]) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.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 _data_write has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function _data_write($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 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 media_handle_upload has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function media_handle_upload($file_id, $post_id, $post_data = array()) {
    $overrides = array('test_form'=>false);

    $time = current_time('mysql');
    if ( $post = get_post($post_id) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/media.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 _data_prepare has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function _data_prepare($mode=FTP_ASCII) {
        if(!$this->_settype($mode)) return FALSE;
        if($this->_passive) {
            if(!$this->_exec("PASV", "pasv")) {
                $this->_data_close();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-ftp-pure.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 make_site_theme has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function make_site_theme() {
    // Name the theme after the blog.
    $theme_name = __get_option('blogname');
    $template = sanitize_title($theme_name);
    $site_dir = WP_CONTENT_DIR . "/themes/$template";
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.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_bulk_actions has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function get_bulk_actions() {
        global $status;

        $actions = 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 no_items has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function no_items() {
        if ( $this->search_terms || $this->features ) {
            _e( 'No items found.' );
            return;
        }

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

    function display_rows_or_placeholder() {
        $taxonomy = $this->screen->taxonomy;

        $args = wp_parse_args( $this->callback_args, array(
            'page' => 1,

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 10 (exceeds 5 allowed). Consider refactoring.
Open

    function prepare_items() {
        global $usersearch, $role, $wpdb, $mode;

        $usersearch = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_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 display_rows has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function display_rows() {
        // Query the post counts for this page
        if ( ! $this->is_site_users )
            $post_counts = count_many_users_posts( array_keys( $this->items ) );

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

    function feedback( $data ) {
        if ( is_wp_error( $data ) )
            $string = $data->get_error_message();
        else if ( is_array( $data ) )
            return;

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

function wp_ajax_get_tagcloud() {
    if ( isset( $_POST['tax'] ) ) {
        $taxonomy = sanitize_key( $_POST['tax'] );
        $tax = get_taxonomy( $taxonomy );
        if ( ! $tax )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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 manage_columns_prefs has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function manage_columns_prefs($page) {
    $columns = get_column_headers($page);

    $hidden = get_hidden_columns($page);

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

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

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

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin-install.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 10 (exceeds 5 allowed). Consider refactoring.
Open

    function error($errors) {
        if ( ! $this->done_header )
            $this->header();
        if ( is_string($errors) ) {
            $this->feedback($errors);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.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_columns has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function get_columns() {
        $post_type = $this->screen->post_type;

        $posts_columns = 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 categories_form has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function categories_form() { ?>

<script type="text/javascript">
/* <![CDATA[ */
var checkflag = "false";
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/wp-cat2tag.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