CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/wp-includes/feed.php

Summary

Maintainability
B
4 hrs
Test Coverage

Function get_the_category_rss has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function get_the_category_rss($type = null) {
    if ( empty($type) )
        $type = get_default_feed();
    $categories = get_the_category();
    $tags = get_the_tags();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/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 prep_atom_text_construct has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function prep_atom_text_construct($data) {
    if (strpos($data, '<') === false && strpos($data, '&') === false) {
        return array('text', $data);
    }

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/feed.php - About 45 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

Avoid too many return statements within this method.
Open

        return array('html', htmlspecialchars($data));
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/feed.php - About 30 mins to fix

    There are no issues that match your filters.

    Category
    Status