CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function is_declared_content_ns has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function is_declared_content_ns($new_mapping) {
        foreach($this->content_ns_contexts as $context) {
            foreach($context as $mapping) {
                if($new_mapping == $mapping) {
                    return true;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/atomlib.php - About 25 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 _render_group has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    final protected function _render_group( $node ) {
        if ( $node->type == 'container' )
            return $this->_render_container( $node );

        if ( $node->type != 'group' || empty( $node->children ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-admin-bar.php - About 25 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_link_query has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function wp_link_query( $args = array() ) {
        $pts = get_post_types( array( 'public' => true ), 'objects' );
        $pt_names = array_keys( $pts );

        $query = array(
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 25 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 serve has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function serve($data = false) {
        if (!$data) {
            global $HTTP_RAW_POST_DATA;
            if (!$HTTP_RAW_POST_DATA) {
               header( 'Content-Type: text/plain' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 25 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 display has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function display( $header, $markup = true, $translate = true ) {
        $value = $this->get( $header );
        if ( false === $value ) {
            return false;
        }
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 25 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_comment_reply_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_comment_reply_link($args = array(), $comment = null, $post = null) {
    global $user_ID;

    $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'),
        'login_text' => __('Log in to Reply'), 'depth' => 0, 'before' => '', 'after' => '');
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment-template.php - About 25 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 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function get($id, $group = 'default') {
        if (empty ($group))
            $group = 'default';

        if (isset ($this->cache[$group][$id])) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/cache.php - About 25 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 parse has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    function parse() {

        set_error_handler(array(&$this, 'error_handler'));

        array_unshift($this->ns_contexts, array());
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/atomlib.php - About 25 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 has_filter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function has_filter($tag, $function_to_check = false) {
    global $wp_filter;

    $has = !empty($wp_filter[$tag]);
    if ( false === $function_to_check || false == $has )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/plugin.php - About 25 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_set_all_user_settings has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function wp_set_all_user_settings( $user_settings ) {
    global $_updated_user_settings;

    if ( ! $user_id = get_current_user_id() )
        return false;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 25 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 comment_type has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) {
    if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' );
    if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' );
    if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' );
    $type = get_comment_type();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/comment-template.php - About 25 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_user_option has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_user_option( $option, $user = 0, $check_blog_options = true ) {
    global $wpdb;

    $option = preg_replace('|[^a-z0-9_]|i', '', $option);
    if ( empty($user) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/user.php - About 25 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 Expand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function Expand($name) {
    $this->error = null; # so no confusion is caused

    if(!$this->connected()) {
      $this->error = array(
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php - About 25 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 Verify has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  function Verify($name) {
    $this->error = null; # so no confusion is caused

    if(!$this->connected()) {
      $this->error = array(
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-smtp.php - About 25 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_edit_comment_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_edit_comment_link( $comment_id = 0 ) {
    $comment = &get_comment( $comment_id );
    $post = &get_post( $comment->comment_post_ID );

    if ( $post->post_type == 'page' ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 25 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_page_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function _get_page_link( $id = false, $leavename = false, $sample = false ) {
    global $post, $wp_rewrite;

    if ( !$id )
        $id = (int) $post->ID;
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 25 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_author_feed_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_author_feed_link( $author_id, $feed = '' ) {
    $author_id = (int) $author_id;
    $permalink_structure = get_option('permalink_structure');

    if ( empty($feed) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 25 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_posts_nav_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_posts_nav_link( $args = array() ) {
    global $wp_query;

    $return = '';

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

function wp_restore_post_revision( $revision_id, $fields = null ) {
    if ( !$revision = wp_get_post_revision( $revision_id, ARRAY_A ) )
        return $revision;

    if ( !is_array( $fields ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/revision.php - About 25 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_next_posts_page_link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function get_next_posts_page_link($max_page = 0) {
    global $paged;

    if ( !is_single() ) {
        if ( !$paged )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 25 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