CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function get_imported_comments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function get_imported_comments( $bid ) {
        global $wpdb;

        $hashtable = array();

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

    function _search_callback( $theme ) {
        static $term;
        if ( is_null( $term ) )
            $term = 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 wp_plugin_update_row has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_plugin_update_row( $file, $plugin_data ) {
    $current = get_transient( 'update_plugins' );
    if ( !isset( $current->response[ $file ] ) )
        return false;

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

    function set_pagination_args( $args ) {
        $args = wp_parse_args( $args, array(
            'total_items' => 0,
            'total_pages' => 0,
            'per_page' => 0,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 25 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 wxr_post_taxonomy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wxr_post_taxonomy() {
    $categories = get_the_category();
    $tags = get_the_tags();
    $the_list = '';
    $filter = 'rss';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/export.php - About 25 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_link_category_checklist has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_link_category_checklist( $link_id = 0 ) {
    $default = 1;

    if ( $link_id ) {
        $checked_categories = wp_get_link_cats($link_id);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 25 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_secondary_output has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

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

function _wp_nav_menu_meta_box_object( $object = null ) {
    if ( isset( $object->name ) ) {

        if ( 'page' == $object->name ) {
            $object->_default_query = array(
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 25 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_sideload_image has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function media_sideload_image($file, $post_id, $desc = null) {
    if (!empty($file) ) {
        // Download file to temp location
        $tmp = download_url($file);

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

function get_sample_permalink($id, $title = null, $name = null) {
    $post = &get_post($id);
    if (!$post->ID) {
        return array('', '');
    }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/post.php - About 25 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_popular_terms_checklist has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) {
    global $post_ID;

    if ( $post_ID )
        $checked_categories = wp_get_post_categories($post_ID);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 25 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 start_el has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
        global $_nav_menu_placeholder;

        $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
        $possible_object_id = isset( $item->post_type ) && 'nav_menu_item' == $item->post_type ? $item->object_id : $_nav_menu_placeholder;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php - About 25 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 mu_dropdown_languages has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
    $flag = false;
    $output = array();

    foreach ( (array) $lang_files as $val ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ms.php - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
Open

    function after() {

        if ( !empty($this->upgrader->result['destination_name']) &&
            ($theme_info = $this->upgrader->theme_info()) &&
            !empty($theme_info) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php - About 25 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 inline_edit_term_row has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function inline_edit_term_row($type) {

    if ( ! current_user_can( 'manage_categories' ) )
        return;

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

    function install_theme_info( $theme ) {
        global $themes_allowedtags;

        if ( empty( $theme ) )
            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_trash_post has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_ajax_trash_post( $action ) {
    if ( empty( $action ) )
        $action = 'trash-post';
    $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;

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

    function dispatch() {
        if (empty ($_GET['step']))
            $step = 0;
        else
            $step = (int) $_GET['step'];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/blogware.php - About 25 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 single_row has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function single_row( $theme ) {
        global $themes_allowedtags;

        if ( empty( $theme ) )
            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_image_editor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_ajax_image_editor() {
    $attachment_id = intval($_POST['postid']);
    if ( empty($attachment_id) || !current_user_can('edit_post', $attachment_id) )
        wp_die( -1 );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 25 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