CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function setup_theme has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public function setup_theme() {
        send_origin_headers();

        if ( is_admin() && ! $this->doing_ajax() )
            auth_redirect();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-manager.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_unique_post_slug has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_parent) {
    if ( in_array( $post_status, array( 'draft', 'pending' ) ) )
        return $slug;

    global $wpdb, $wp_rewrite;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post.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_save_post_revision has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function wp_save_post_revision( $post_id ) {
    // We do autosaves manually with wp_create_post_autosave()
    if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
        return;

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

    function import_from_file($filename) {
        $f = fopen($filename, 'r');
        if (!$f) return false;
        $lineno = 0;
        while (true) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pomo/po.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 Translation_Entry has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function Translation_Entry($args=array()) {
        // if no singular -- empty object
        if (!isset($args['singular'])) {
            return;
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/pomo/entry.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 remove_dot_segments has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    protected function remove_dot_segments($input)
    {
        $output = '';
        while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
        {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/IRI.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 debug has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public static function debug(&$sp)
    {
        $info = 'SimplePie ' . SIMPLEPIE_VERSION . ' Build ' . SIMPLEPIE_BUILD . "\n";
        $info .= 'PHP ' . PHP_VERSION . "\n";
        if ($sp->error() !== null)
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 ms_cookie_constants has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function ms_cookie_constants(  ) {
    $current_site = get_current_site();

    /**
     * @since 1.2.0
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-default-constants.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_dropdown_categories has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function wp_dropdown_categories( $args = '' ) {
    $defaults = array(
        'show_option_all' => '', 'show_option_none' => '',
        'orderby' => 'id', 'order' => 'ASC',
        'show_last_update' => 0, 'show_count' => 0,
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/category-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 __construct has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function __construct( $date_query, $default_column = 'post_date' ) {
        if ( empty( $date_query ) || ! is_array( $date_query ) )
            return;

        if ( isset( $date_query['relation'] ) && strtoupper( $date_query['relation'] ) == 'OR' )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/date.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_get_associated_nav_menu_items has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_type', $taxonomy = '' ) {
    $object_id = (int) $object_id;
    $menu_item_ids = array();

    $query = new WP_Query;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/nav-menu.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 sanitize_bookmark has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function sanitize_bookmark($bookmark, $context = 'display') {
    $fields = array('link_id', 'link_url', 'link_name', 'link_image', 'link_target', 'link_category',
        'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_updated',
        'link_rel', 'link_notes', 'link_rss', );

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

    function __construct($dbuser, $dbpassword, $dbname, $dbhost) {
        register_shutdown_function(array(&$this, "__destruct"));

        if ( WP_DEBUG )
            $this->show_errors();
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 apop has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function apop ($login,$pass) {
        //  Attempts an APOP login. If this fails, it'll
        //  try a standard login. YOUR SERVER MUST SUPPORT
        //  THE USE OF THE APOP COMMAND!
        //  (apop is optional per rfc1939)
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-pop3.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_category_by_path has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) {
    $category_path = rawurlencode( urldecode( $category_path ) );
    $category_path = str_replace( '%2F', '/', $category_path );
    $category_path = str_replace( '%20', ' ', $category_path );
    $category_paths = '/' . trim( $category_path, '/' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/category.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 save has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function save($data)
    {
        if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location))
        {
            if (is_a($data, 'SimplePie'))
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 remove_dot_segments has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function remove_dot_segments($input)
    {
        $output = '';
        while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
        {
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_feed_tags has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function get_feed_tags($namespace, $tag)
    {
        $type = $this->get_type();
        if ($type & SIMPLEPIE_TYPE_ATOM_10)
        {
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 remove_dot_segments has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function remove_dot_segments($input)
    {
        $output = '';
        while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
        {
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_id has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    function get_id($hash = false)
    {
        if (!$hash)
        {
            if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id'))
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

Severity
Category
Status
Source
Language