CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

function print_column_headers( $type, $id = true ) {
    $type = str_replace('.php', '', $type);
    $columns = get_column_headers( $type );
    $hidden = get_hidden_columns($type);
    $styles = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.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 touch_time has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
    global $wp_locale, $post, $comment;

    if ( $for_post )
        $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date_gmt || '0000-00-00 00:00:00' == $post->post_date_gmt ) ) ? false : true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/template.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_ajax_wp_fullscreen_save_post has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function wp_ajax_wp_fullscreen_save_post() {
    $post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : 0;

    $post = $post_type = null;

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

function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
    _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );

    global $wpdb;

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

function wp_ajax_ajax_tag_search() {
    global $wpdb;

    if ( isset( $_GET['tax'] ) ) {
        $taxonomy = sanitize_key( $_GET['tax'] );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.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() {
        global $post_id, $comment_status, $search, $comment_type;

        $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
        if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )

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

    function checkauthor($author) {
        //mtnames is an array with the names in the mt import file
        $pass = wp_generate_password();
        if (!(in_array($author, $this->mtnames))) { //a new mt author name is found
            ++ $this->j;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/mt.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 extract_from_markers has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function extract_from_markers( $filename, $marker ) {
    $result = array ();

    if (!file_exists( $filename ) ) {
        return $result;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/misc.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 iis7_save_url_rewrite_rules has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function iis7_save_url_rewrite_rules(){
    global $wp_rewrite;

    $home_path = get_home_path();
    $web_config_file = $home_path . 'web.config';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/misc.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 take_action has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function take_action() {
        if ( isset( $_POST['textcolor'] ) ) {
            check_admin_referer('custom-header');
            if ( 'blank' == $_POST['textcolor'] ) {
                set_theme_mod('header_textcolor', 'blank');
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/custom-header.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/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 dispatch has a Cognitive Complexity of 9 (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/utw.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 download_post_meta has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function download_post_meta() {
        $total           = (int) get_option( 'ljapi_total' );
        $count           = (int) get_option( 'ljapi_count' );
        $lastsync        = get_option( 'ljapi_lastsync' );
        if ( !$lastsync ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.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 process_terms has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function process_terms() {
        global $wpdb, $wp_taxonomies;
        
        $custom_taxonomies = $wp_taxonomies;
        // get rid of the standard taxonomies
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.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_getComments has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_getComments($args) {
        $this->escape($args);

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.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_setOptions has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_setOptions( $args ) {
        $this->escape( $args );

        $blog_id    = (int) $args[0];
        $username    = $args[1];
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.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_accepted_content_type has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function get_accepted_content_type($types = null) {

        if(!isset($types)) {
            $types = $this->media_content_types;
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-app.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 mt_getRecentPostTitles has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    function mt_getRecentPostTitles($args) {

        $this->escape($args);

        $blog_ID     = (int) $args[0];
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.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 enter_api_key has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static function enter_api_key() {
        if ( function_exists('current_user_can') && !current_user_can('manage_options') )
            die(__('Cheatin’ uh?', 'akismet'));

        if ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) )

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

    public static function get_user_roles( $user_id ) {
        $roles = false;

        if ( !class_exists('WP_User') )
            return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/class.akismet.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