CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function SimplePie_Parse_Date has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function SimplePie_Parse_Date()
    {
        $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
        $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 atom_10_content_construct_type has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function atom_10_content_construct_type($attribs)
    {
        if (isset($attribs['']['type']))
        {
            $type = strtolower(trim($attribs['']['type']));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 get_image_url has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function get_image_url()
    {
        if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image'))
        {
            return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 add_to_service has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function add_to_service($item_url, $title_url = null, $summary_url = null)
    {
        if ($this->get_permalink() !== null)
        {
            $return = $item_url . rawurlencode($this->get_permalink());
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 quote has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function quote()
    {
        if ($this->is_linear_whitespace())
        {
            $this->linear_whitespace();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 get_iri has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function get_iri()
    {
        $iri = '';
        if ($this->scheme !== null)
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 fix_protocol has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function fix_protocol($url, $http = 1)
    {
        $url = SimplePie_Misc::normalize_url($url);
        $parsed = SimplePie_Misc::parse_url($url);
        if ($parsed['scheme'] !== '' && $parsed['scheme'] !== 'http' && $parsed['scheme'] !== 'https')
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 set_path has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function set_path($path)
    {
        if ($path === null || $path === '')
        {
            $this->path = null;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 do_strip_htmltags has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function do_strip_htmltags($match)
    {
        if ($this->encode_instead_of_strip)
        {
            if (isset($match[4]) && !in_array(strtolower($match[1]), array('script', 'style')))
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 35 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 page_uri_index has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function page_uri_index() {
        global $wpdb;

        //get pages in order of hierarchy, i.e. children after parents
        $posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'"));
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/rewrite.php - About 35 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 is_ssl has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function is_ssl() {
    if ( isset($_SERVER['HTTPS']) ) {
        if ( 'on' == strtolower($_SERVER['HTTPS']) )
            return true;
        if ( '1' == $_SERVER['HTTPS'] )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 35 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 check_upload_mimes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function check_upload_mimes( $mimes ) {
    $site_exts = explode( ' ', get_site_option( 'upload_filetypes' ) );
    foreach ( $site_exts as $ext ) {
        foreach ( $mimes as $ext_pattern => $mime ) {
            if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 35 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 ms_not_installed has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function ms_not_installed() {
    global $wpdb, $domain, $path;

    wp_load_translations_early();

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-load.php - About 35 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 sanitize_header has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private function sanitize_header( $header, $value ) {
        switch ( $header ) {
            case 'Status' :
                if ( ! $value ) {
                    $value = 'publish';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 35 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 apply_filters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function apply_filters($tag, $value) {
    global $wp_filter, $merged_filters, $wp_current_filter;

    $args = array();
    $wp_current_filter[] = $tag;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/plugin.php - About 35 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 update_option has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function update_option( $option_name, $newvalue ) {
    global $wpdb;

    wp_protect_special_option( $option_name );

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

function wp_mkdir_p( $target ) {
    // from php.net/mkdir user contributed notes
    $target = str_replace( '//', '/', $target );
    if ( file_exists( $target ) )
        return @is_dir( $target );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 35 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 query has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function query( $handle, $list = 'registered' ) { // registered, queue, done, to_do
        switch ( $list ) :
        case 'registered':
        case 'scripts': // back compat
            if ( isset($this->registered[$handle]) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class.wp-dependencies.php - About 35 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 date_i18n has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
    global $wp_locale;
    $i = $unixtimestamp;
    // Sanity check for PHP 5.1.0-
    if ( false === $i || intval($i) < 0 ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 35 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 apache_mod_loaded has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function apache_mod_loaded($mod, $default = false) {
    global $is_apache;

    if ( !$is_apache )
        return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 35 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