CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function months_dropdown has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function months_dropdown( $post_type ) {
        global $wpdb, $wp_locale;

        $months = $wpdb->get_results( $wpdb->prepare( "
            SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 35 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_column_info has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function get_column_info() {
        if ( isset( $this->_column_headers ) )
            return $this->_column_headers;

        $columns = get_column_headers( $this->screen );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 35 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 7 (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.php - About 35 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_columns has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function single_row_columns( $item ) {
        list( $columns, $hidden ) = $this->get_column_info();

        foreach ( $columns as $column_name => $column_display_name ) {
            $class = "class='$column_name column-$column_name'";
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 35 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_list_table has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function _get_list_table( $class, $args = array() ) {
    $core_classes = array(
        //Site Admin
        'WP_Posts_List_Table' => 'posts',
        'WP_Media_List_Table' => 'media',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/list-table.php - About 35 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 7 (exceeds 5 allowed). Consider refactoring.
Open

    function after() {
        if ( $this->upgrader->bulk )
            return;

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

function activate_plugins($plugins, $redirect = '') {
    if ( !is_array($plugins) )
        $plugins = array($plugins);

    $errors = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin.php - About 35 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 rmdir has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function rmdir($path, $recursive = false) {
        //Currently unused and untested, Use delete() instead.
        if ( ! $recursive )
            return @rmdir($path);
        //recursive:

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

function wp_ajax_dim_comment() {
    $id = isset( $_POST['id'] ) ? (int) $_POST['id'] : 0;

    if ( !$comment = get_comment( $id ) ) {
        $x = new WP_Ajax_Response( array(
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 35 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_add_tag has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function wp_ajax_add_tag() {
    global $wp_list_table;

    check_ajax_referer( 'add-tag', '_wpnonce_add-tag' );
    $post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 35 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 populate_roles_210 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function populate_roles_210() {
    $roles = array('administrator', 'editor');
    foreach ($roles as $role) {
        $role =& get_role($role);
        if ( empty($role) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/schema.php - About 35 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 7 (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/mt.php - About 35 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_categories has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function process_categories() {
        global $wpdb;

        $cat_names = (array) get_terms('category', 'fields=names');

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

    function fetch_remote_file($post, $url) {
        $upload = wp_upload_dir($post['post_date']);

        // extract the file name and extension from the url
        $file_name = basename($url);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.php - About 35 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 7 (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/stp.php - About 35 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 cat2wp has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

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

    function import_comment( $entry ) {
        global $importing_blog;

        // Drop the #fragment and we have the comment's old post permalink.
        foreach ( $entry->links as $link ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/blogger.php - About 35 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 comments2wp has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

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

    function cat2wp($categories='')
    {
        // General Housekeeping
        global $wpdb;
        $count = 0;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/dotclear.php - About 35 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