CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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

    function get_col_info($info_type = 'name', $col_offset = -1) {
        if ( $this->col_info ) {
            if ( $col_offset == -1 ) {
                $i = 0;
                foreach( (array) $this->col_info as $col ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/wp-db.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 the_meta has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function the_meta() {
    if ( $keys = get_post_custom_keys() ) {
        echo "<ul class='post-meta'>\n";
        foreach ( (array) $keys as $key ) {
            $keyt = trim($key);
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-template.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 image has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function image()
    {
        if (substr($this->file->body, 0, 6) === 'GIF87a'
            || substr($this->file->body, 0, 6) === 'GIF89a')
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Content/Type/Sniffer.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 should_decode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function should_decode($headers) {
        if ( is_array( $headers ) ) {
            if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
                return true;
        } else if ( is_string( $headers ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.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 rss_enclosure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function rss_enclosure() {
    if ( post_password_required() )
        return;

    foreach ( (array) get_post_custom() as $key => $val) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/feed.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_enclosure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function atom_enclosure() {
    if ( post_password_required() )
        return;

    foreach ( (array) get_post_custom() as $key => $val ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/feed.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 test has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function test($args = array()) {
        if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) )
            return false;

        if ( version_compare(PHP_VERSION, '5.0', '<') )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/http.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_caller has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function get_caller() {
        // requires PHP 4.3+
        if ( !is_callable('debug_backtrace') )
            return '';

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

    function top ($msgNum, $numLines = "0") {
        //  Gets the header and first $numLines of the msg body
        //  returns data in an array with each returned line being
        //  an array element. If $numLines is empty, returns
        //  only the header information, and none of the body.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.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 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 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 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 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 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 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 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 enqueue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function enqueue( $handles ) {
        foreach ( (array) $handles as $handle ) {
            $handle = explode('?', $handle);
            if ( !in_array($handle[0], $this->queue) && isset($this->registered[$handle[0]]) ) {
                $this->queue[] = $handle[0];
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

Severity
Category
Status
Source
Language