CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function akismet_auto_check_comment has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function akismet_auto_check_comment( $comment ) {
    global $akismet_api_host, $akismet_api_port;

    $comment['user_ip']    = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
    $comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
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 single_cat_title has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function single_cat_title($prefix = '', $display = true ) {
    $cat = intval( get_query_var('cat') );
    if ( !empty($cat) && !(strtoupper($cat) == 'ALL') ) {
        $my_cat_name = apply_filters('single_cat_title', get_the_category_by_ID($cat));
        if ( !empty($my_cat_name) ) {
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 clean_term_cache has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function clean_term_cache($ids, $taxonomy = '') {
    global $wpdb;
    static $cleaned = array();

    if ( !is_array($ids) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.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 register_taxonomy has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
    global $wp_taxonomies, $wp_rewrite, $wp;

    if (!is_array($wp_taxonomies))
        $wp_taxonomies = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/taxonomy.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 CalculateReplayGain has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function CalculateReplayGain() {
        if (isset($this->info['replay_gain'])) {
            if (!isset($this->info['replay_gain']['reference_volume'])) {
                $this->info['replay_gain']['reference_volume'] = (double) 89.0;
            }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.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 ProcessAudioStreams has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function ProcessAudioStreams() {
        if (!empty($this->info['audio']['bitrate']) || !empty($this->info['audio']['channels']) || !empty($this->info['audio']['sample_rate'])) {
            if (!isset($this->info['audio']['streams'])) {
                foreach ($this->info['audio'] as $key => $value) {
                    if ($key != 'streams') {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.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 IsValidDateStampString has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public static function IsValidDateStampString($datestamp) {
        if (strlen($datestamp) != 8) {
            return false;
        }
        if (!self::IsANumber($datestamp, false)) {
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 wp_admin_bar_edit_menu has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function wp_admin_bar_edit_menu( $wp_admin_bar ) {
    global $tag, $wp_the_query;

    if ( is_admin() ) {
        $current_screen = get_current_screen();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/admin-bar.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_kses_bad_protocol_once2 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function wp_kses_bad_protocol_once2($matches) {
    global $_kses_allowed_protocols;

    if ( is_array($matches) ) {
        if ( ! isset($matches[1]) || empty($matches[1]) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/kses.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 HashPassword has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function HashPassword($password)
    {
        $random = '';

        if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpass.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 change_encoding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public static function change_encoding($data, $input, $output)
    {
        $input = SimplePie_Misc::encoding($input);
        $output = SimplePie_Misc::encoding($output);

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

    public function get_description($description_only = false)
    {
        if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'summary'))
        {
            return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Item.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 image_resize_dimensions has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) {

    if ($orig_w <= 0 || $orig_h <= 0)
        return false;
    // at least one of dest_w or dest_h must be specific
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/media.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 chunkTransferDecode has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function chunkTransferDecode($body) {
        $body = str_replace(array("\r\n", "\r"), "\n", $body);
        // The body is not chunked encoding or is malformed.
        if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) )
            return $body;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.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 shortcode_parse_atts has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function shortcode_parse_atts($text) {
    $atts = array();
    $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/';
    $text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
    if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/shortcodes.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 update has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function update($table, $data, $where, $format = null, $where_format = null) {
        if ( !is_array( $where ) )
            return false;

        $formats = $format = (array) $format;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-db.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_SimplePie_File has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function WP_SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) {
        $this->url = $url;
        $this->timeout = $timeout;
        $this->redirects = $redirects;
        $this->headers = $headers;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-feed.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_currentuserinfo has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function get_currentuserinfo() {
    global $current_user;

    if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
        return false;
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 change_encoding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function change_encoding($data, $input, $output)
    {
        $input = SimplePie_Misc::encoding($input);
        $output = SimplePie_Misc::encoding($output);

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

    function get_html( $url, $args = '' ) {
        $provider = false;

        if ( !isset($args['discover']) )
            $args['discover'] = true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-oembed.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