CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function get_categories has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    function get_categories()
    {
        $categories = array();

        foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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_categories has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    function get_categories()
    {
        $categories = array();

        foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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_parse_auth_cookie has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function wp_parse_auth_cookie($cookie = '', $scheme = '') {
    if ( empty($cookie) ) {
        switch ($scheme){
            case 'auth':
                $cookie_name = AUTH_COOKIE;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.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_categories has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    function get_categories()
    {
        $categories = array();

        foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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_scheduled_delete has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function wp_scheduled_delete() {
    global $wpdb;

    $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);

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

    function call($methodname, $args) {
        if (!$this->hasMethod($methodname)) {
            return new IXR_Error(-32601, 'server error. requested method '.
                $methodname.' does not exist.');
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.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_list_bookmarks has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function wp_list_bookmarks($args = '') {
    $defaults = array(
        'orderby' => 'name', 'order' => 'ASC',
        'limit' => -1, 'category' => '', 'exclude_category' => '',
        'category_name' => '', 'hide_invisible' => 1,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/bookmark-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 remove_user_from_blog has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function remove_user_from_blog($user_id, $blog_id = '', $reassign = '') {
    global $wpdb;
    switch_to_blog($blog_id);
    $user_id = (int) $user_id;
    /**
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.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 switch_to_blog has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function switch_to_blog( $new_blog, $deprecated = null ) {
    global $wpdb, $wp_roles;

    if ( empty( $new_blog ) )
        $new_blog = $GLOBALS['blog_id'];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.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 parse_settings has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public static function parse_settings( $editor_id, $settings ) {
        $set = wp_parse_args( $settings,  array(
            'wpautop'           => true,
            'media_buttons'     => true,
            'default_editor'    => '',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.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_upload_dir has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function wp_upload_dir( $time = null ) {
    $siteurl = get_option( 'siteurl' );
    $upload_path = get_option( 'upload_path' );
    $upload_path = trim($upload_path);
    if ( empty($upload_path) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.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 seems_utf8 has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function seems_utf8($str) {
    $length = strlen($str);
    for ($i=0; $i < $length; $i++) {
        $c = ord($str[$i]);
        if ($c < 0x80) $n = 0; # 0bbbbbbb
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.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_cookie_constants has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function wp_cookie_constants() {
    /**
     * Used to guarantee unique hash cookies
     *
     * @since 1.5.0
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/default-constants.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 ms_site_check has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function ms_site_check() {
    $blog = get_blog_details();

    /**
     * Filter checking the status of the current blog.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-load.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 restore_current_blog has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function restore_current_blog() {
    global $wpdb, $wp_roles;

    if ( empty( $GLOBALS['_wp_switched_stack'] ) )
        return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.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 human_time_diff has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function human_time_diff( $from, $to = '' ) {
    if ( empty($to) )
        $to = time();
    $diff = (int) abs($to - $from);
    if ($diff <= 3600) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.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 sanitize_file_name has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function sanitize_file_name( $filename ) {
    $filename_raw = $filename;
    $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0));
    $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw);
    $filename = str_replace($special_chars, '', $filename);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/formatting.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_adjacent_post has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $previous = true) {
    global $post, $wpdb;

    if ( empty($post) || !is_single() || is_attachment() )
        return null;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-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 AttachAll has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

  function AttachAll() {
    /* Return text of body */
    $mime = array();

    /* Add all attachments */
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.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_pagenum_link has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function get_pagenum_link($pagenum = 1) {
    global $wp_rewrite;

    $pagenum = (int) $pagenum;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-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

Severity
Category
Status
Source
Language