CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

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

  function Help($keyword="") {
    $this->error = null; # to avoid confusion

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

function edit_comment_link( $link = null, $before = '', $after = '' ) {
    global $comment, $post;

    if ( $post->post_type == 'page' ) {
        if ( !current_user_can( 'edit_page', $post->ID ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-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 make_image has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    protected function make_image( $filename, $function, $arguments ) {
        if ( $stream = wp_is_stream( $filename ) ) {
            ob_start();
        } else {
            // The directory containing the original file may no longer exist when using a replication plugin.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-image-editor.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

Method Then has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
Open

        protected Action<object> Then(params object[] expectedEvents)
        {
            return got =>
            {
                var gotEvents = got as object[];
Severity: Minor
Found in Edument.CQRS/BDDTest.cs - 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 function.
Open

    return true;
Severity: Major
Found in Web.Admin/z-scripts/angular-mocks.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return transition;
    Severity: Major
    Found in Web.Admin/z-scripts/angular-ui-router.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return data == d;
      Severity: Major
      Found in Web.Admin/z-scripts/angular-mocks.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                return that.eventOnClickCancelLink(e.target);
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  if ( !s.data.match(/_ajax_nonce=[a-f0-9]+/) ) { return true; }
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                      if (node == targetNode) return [targetNode];
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return el.value;
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery.form.dev.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            if ( !s ) { return true; }
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return false;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return false;
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/js/wp-lists.dev.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return false;
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery.color.dev.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return value;
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return false;
                            Severity: Major
                            Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return false;
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language