CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    function wp_getUsersBlogs( $args ) {
        // If this isn't on WPMU then just use blogger_getUsersBlogs
        if( !function_exists( 'is_site_admin' ) ) {
            array_unshift( $args, 1 );
            return $this->blogger_getUsersBlogs( $args );
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.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 mw_newMediaObject has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function mw_newMediaObject($args) {
        global $wpdb;

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

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

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

    function pingback_extensions_getPingbacks($args) {

        global $wpdb;

        do_action('xmlrpc_call', 'pingback.extensions.getPingbacks');
Severity: Minor
Found in Web.Admin/2014/wordpress/xmlrpc.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_plugins_filter_callback has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function _search_plugins_filter_callback($plugin) {
        static $term;
        if ( is_null($term) )
            $term = stripslashes($_GET['s']);
        if (     stripos($plugin['Name'], $term) !== false ||
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/plugins.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 startElement has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function startElement($parser, $tagName, $attrs) {
    global $updated_timestamp, $all_links, $map;
    global $names, $urls, $targets, $descriptions, $feeds;

    if ($tagName == 'OUTLINE') {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/link-parse-opml.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 put_file has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function put_file($postID) {

        // first check if user can upload
        if(!current_user_can('upload_files'))
            $this->auth_required(__('You do not have permission to upload files.'));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-app.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_unregister_GLOBALS has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_unregister_GLOBALS() {
    if ( !ini_get('register_globals') )
        return;

    if ( isset($_REQUEST['GLOBALS']) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-settings.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 twentythirteen_paging_nav has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function twentythirteen_paging_nav() {
    global $wp_query;

    // Don't print empty markup if there's only one page.
    if ( $wp_query->max_num_pages < 2 )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/themes/twentythirteen/functions.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 separate_comments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function &separate_comments(&$comments) {
    $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array());
    $count = count($comments);
    for ( $i = 0; $i < $count; $i++ ) {
        $type = $comments[$i]->comment_type;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment.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 twentythirteen_fonts_url has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function twentythirteen_fonts_url() {
    $fonts_url = '';

    /* Translators: If there are characters in your language that are not
     * supported by Source Sans Pro, translate this to 'off'. Do not translate
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/themes/twentythirteen/functions.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 twentyfourteen_list_authors has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function twentyfourteen_list_authors() {
    $contributor_ids = get_users( array(
        'fields'  => 'ID',
        'orderby' => 'post_count',
        'order'   => 'DESC',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/themes/twentyfourteen/functions.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 twentyfourteen_post_nav has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function twentyfourteen_post_nav() {
    // Don't print empty markup if there's nowhere to navigate.
    $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
    $next     = get_adjacent_post( false, '', false );

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

function akismet_http_post($request, $host, $path, $port = 80, $ip=null) {
    global $wp_version;
    
    $akismet_version = constant('AKISMET_VERSION');

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.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 twentyfourteen_header_style has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function twentyfourteen_header_style() {
    $text_color = get_header_textcolor();

    // If no custom color for text is set, let's bail.
    if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) )

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

    function wp_getUsersBlogs( $args ) {
        // If this isn't on WPMU then just use blogger_getUsersBlogs
        if ( !is_multisite() ) {
            array_unshift( $args, 1 );
            return $this->blogger_getUsersBlogs( $args );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.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_getTaxonomy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_getTaxonomy( $args ) {
        if ( ! $this->minimum_args( $args, 4 ) )
            return $this->error;

        $this->escape( $args );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.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_getPost has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_getPost( $args ) {
        if ( ! $this->minimum_args( $args, 4 ) )
            return $this->error;

        $this->escape( $args );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.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_getPostType has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_getPostType( $args ) {
        if ( ! $this->minimum_args( $args, 4 ) )
            return $this->error;

        $this->escape( $args );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.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_getPage has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

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

        $blog_id    = (int) $args[0];
        $page_id    = (int) $args[1];
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.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