CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function download_comment_bodies has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function download_comment_bodies() {
        global $wpdb;
        $cookie = $this->get_session();
        if ( is_wp_error( $cookie ) )
            return $cookie;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/import/livejournal.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 create_post has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function create_post() {
        global $blog_id, $user_ID;
        $this->get_accepted_content_type($this->atom_content_types);

        $parser = new AtomParser();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-app.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 process_conditionals has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function process_conditionals() {

        if(empty($this->params)) return;
        if($_SERVER['REQUEST_METHOD'] == 'DELETE') return;

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

function maybe_create_table($table_name, $create_ddl) {
    global $wpdb;
    foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) {
        if ($table == $table_name) {
            return true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/install-helper.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 maybe_drop_column has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function maybe_drop_column($table_name, $column_name, $drop_ddl) {
    global $wpdb;
    foreach ($wpdb->get_col("DESC $table_name",0) as $column ) {
        if ($column == $column_name) {
            //found it try to drop it.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/install-helper.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_set_comment_status has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) {
    global $wpdb;

    $status = '0';
    switch ( $comment_status ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment.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 do_trackbacks has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function do_trackbacks($post_id) {
    global $wpdb;

    $post = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $post_id) );
    $to_ping = get_to_ping($post_id);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment.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 akismet_spam_count has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function akismet_spam_count( $type = false ) {
    global $wpdb;

    if ( !$type ) { // total
        $count = wp_cache_get( 'akismet_spam_count', 'widget' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/akismet.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_spam_count has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function get_spam_count( $type = false ) {
        global $wpdb;

        if ( !$type ) { // total
            $count = wp_cache_get( 'akismet_spam_count', 'widget' );

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

function twentyfourteen_post_thumbnail() {
    if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
        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 blogger_getRecentPosts has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    function blogger_getRecentPosts($args) {

        $this->escape($args);

        // $args[0] = appkey - ignored
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.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 feed_links_extra has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function feed_links_extra( $args ) {
    $defaults = array(
        /* translators: Separator between blog name and feed type in feed links */
        'separator'   => _x('»', 'feed link'),
        /* translators: 1: blog name, 2: separator(raquo), 3: post title */
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/general-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 wp_editPost has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

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

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

function single_tag_title($prefix = '', $display = true ) {
    if ( !is_tag() )
        return;

    $tag_id = intval( get_query_var('tag_id') );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/general-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 ParseOggPageHeader has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public function ParseOggPageHeader() {
        // http://xiph.org/ogg/vorbis/doc/framing.html
        $oggheader['page_start_offset'] = $this->ftell(); // where we started from in the file

        $filedata = $this->fread($this->getid3->fread_buffer_size());
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ogg.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 IsANumber has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function IsANumber($numberstring, $allowdecimal=false, $allownegative=false) {
        for ($i = 0; $i < strlen($numberstring); $i++) {
            if ((chr($numberstring{$i}) < chr('0')) || (chr($numberstring{$i}) > chr('9'))) {
                if (($numberstring{$i} == '.') && $allowdecimal) {
                    // allowed
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v2.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 iconv_fallback_utf8_utf16be has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function iconv_fallback_utf8_utf16be($string, $bom=false) {
        $newcharstring = '';
        if ($bom) {
            $newcharstring .= "\xFE\xFF";
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.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 ExtractCommentsSimpleTag has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    private function ExtractCommentsSimpleTag($SimpleTagArray) {
        if (!empty($SimpleTagArray['SimpleTag'])) {
            foreach ($SimpleTagArray['SimpleTag'] as $SimpleTagKey => $SimpleTagData) {
                if (!empty($SimpleTagData['TagName']) && !empty($SimpleTagData['TagString'])) {
                    $this->getid3->info['matroska']['comments'][strtolower($SimpleTagData['TagName'])][] = $SimpleTagData['TagString'];

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

    public static function iconv_fallback_utf8_utf16le($string, $bom=false) {
        $newcharstring = '';
        if ($bom) {
            $newcharstring .= "\xFF\xFE";
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.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