CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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

    function print_column_headers( $with_id = true ) {
        list( $columns, $hidden, $sortable ) = $this->get_column_info();

        $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
        $current_url = remove_query_arg( 'paged', $current_url );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-list-table.php - About 2 hrs 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 upgrade_100 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function upgrade_100() {
    global $wpdb;

    // Get the title and ID of every post, post_name to check if it already has a value
    $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''");
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 2 hrs 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 upgrade_130 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function upgrade_130() {
    global $wpdb;

    // Remove extraneous backslashes.
    $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts");
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 2 hrs 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_save_widget has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function wp_ajax_save_widget() {
    global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;

    check_ajax_referer( 'save-sidebar-widgets', 'savewidgets' );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 2 hrs 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 20 (exceeds 5 allowed). Consider refactoring.
Open

    function take_action() {

        if ( empty($_POST) )
            return;

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

function pingback($content, $post_ID) {
    global $wp_version;
    include_once(ABSPATH . WPINC . '/class-IXR.php');

    // original code by Mort (http://mort.mine.nu:8080)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment.php - About 2 hrs 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_editTerm has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    function wp_editTerm( $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 2 hrs 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 RecursiveFrameScanning has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR) {
        $info = &$this->getid3->info;
        $firstframetestarray = array('error'=>'', 'warning'=>'', 'avdataend'=>$info['avdataend'], 'avdataoffset'=>$info['avdataoffset']);
        $this->decodeMPEGaudioHeader($offset, $firstframetestarray, false);

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 2 hrs 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_insert_term has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function wp_insert_term( $term, $taxonomy, $args = array() ) {
    global $wpdb;

    if ( ! is_taxonomy($taxonomy) )
        return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.php - About 2 hrs 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 Analyze has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function Analyze() {
        $info = &$this->getid3->info;

        if (!getid3_lib::intValueSupported($info['filesize'])) {
            $info['warning'][] = 'Unable to check for ID3v1 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v1.php - About 2 hrs 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 codepoint_to_utf8 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public static function codepoint_to_utf8($codepoint)
    {
        $codepoint = (int) $codepoint;
        if ($codepoint < 0)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 2 hrs 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_element has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public static function get_element($realname, $string)
    {
        $return = array();
        $name = preg_quote($realname, '/');
        if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Misc.php - About 2 hrs 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_widget_rss_form has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function wp_widget_rss_form( $args, $inputs = null ) {

    $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true );
    $inputs = wp_parse_args( $inputs, $default_inputs );
    extract( $args );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/default-widgets.php - About 2 hrs 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_the_content has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function get_the_content($more_link_text = null, $stripteaser = 0) {
    global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow;

    if ( null === $more_link_text )
        $more_link_text = __( '(more...)' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 2 hrs 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 setup_widget_addition_previews has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function setup_widget_addition_previews() {
        $is_customize_preview = false;

        if ( ! empty( $this->manager ) && ! is_admin() && 'on' === $this->get_post_value( 'wp_customize' ) ) {
            $is_customize_preview = check_ajax_referer( 'preview-customize_' . $this->manager->get_stylesheet(), 'nonce', false );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-widgets.php - About 2 hrs 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_type has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function get_type()
    {
        if (isset($this->file->headers['content-type']))
        {
            if (!isset($this->file->headers['content-encoding'])

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

function gallery_shortcode($attr) {
    global $post, $wp_locale;

    static $instance = 0;
    $instance++;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 2 hrs 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_auth_cookie has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function wp_set_auth_cookie($user_id, $remember = false, $secure = '') {
    if ( $remember ) {
        $expiration = $expire = time() + apply_filters('auth_cookie_expiration', 1209600, $user_id, $remember);
    } else {
        $expiration = time() + apply_filters('auth_cookie_expiration', 172800, $user_id, $remember);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 2 hrs 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 codepoint_to_utf8 has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    function codepoint_to_utf8($codepoint)
    {
        $codepoint = (int) $codepoint;
        if ($codepoint < 0)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs 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_element has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    function get_element($realname, $string)
    {
        $return = array();
        $name = preg_quote($realname, '/');
        if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 hrs 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