CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Method wp_list_pages has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function wp_list_pages($args = '') {
    $defaults = array(
        'depth' => 0, 'show_date' => '',
        'date_format' => get_option('date_format'),
        'child_of' => 0, 'exclude' => '',
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/post-template.php - About 1 hr to fix

    Method image_get_intermediate_size has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function image_get_intermediate_size($post_id, $size='thumbnail') {
        if ( !is_array( $imagedata = wp_get_attachment_metadata( $post_id ) ) )
            return false;
    
        // get the best one for a specified set of dimensions
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/media.php - About 1 hr to fix

      Method _compareseq has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _compareseq ($xoff, $xlim, $yoff, $ylim)
          {
              /* Slide down the bottom initial diagonal. */
              while ($xoff < $xlim && $yoff < $ylim
                     && $this->xv[$xoff] == $this->yv[$yoff]) {
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.php - About 1 hr to fix

        Method get_title has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function get_title()
            {
                if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
                {
                    return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0]));
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

          Method get_language has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function get_language()
              {
                  if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language'))
                  {
                      return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

            Method get_title has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function get_title()
                {
                    if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title'))
                    {
                        return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0]));
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

              Method get_image_tags has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function get_image_tags($namespace, $tag)
                  {
                      $type = $this->get_type();
                      if ($type & SIMPLEPIE_TYPE_RSS_10)
                      {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 1 hr to fix

                Method is_email has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function is_email( $email, $check_dns = false ) {
                    // Test for the minimum length the email can be
                    if ( strlen( $email ) < 3 ) {
                        return apply_filters( 'is_email', false, $email, 'email_too_short' );
                    }
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 1 hr to fix

                  Method wpmu_signup_blog_notification has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function wpmu_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key, $meta = array() ) {
                      /**
                       * Filter whether to bypass the new site email notification.
                       *
                       * @since MU
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 1 hr to fix

                    Method wpmu_create_blog has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function wpmu_create_blog( $domain, $path, $title, $user_id, $meta = array(), $site_id = 1 ) {
                        $defaults = array( 'public' => 0 );
                        $meta = wp_parse_args( $meta, $defaults );
                    
                        $domain = preg_replace( '/\s+/', '', sanitize_user( $domain, true ) );
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 1 hr to fix

                      Method discover has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function discover( $url ) {
                              $providers = array();
                      
                              // Fetch URL content
                              if ( $html = wp_remote_retrieve_body( wp_remote_get( $url ) ) ) {
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/class-oembed.php - About 1 hr to fix

                        Method _wp_timezone_choice_usort_callback has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function _wp_timezone_choice_usort_callback( $a, $b ) {
                            // Don't use translated versions of Etc
                            if ( 'Etc' === $a['continent'] && 'Etc' === $b['continent'] ) {
                                // Make the order of these more like the old dropdown
                                if ( 'GMT+' === substr( $a['city'], 0, 4 ) && 'GMT+' === substr( $b['city'], 0, 4 ) ) {
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 1 hr to fix

                          Method do_action has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function do_action($tag, $arg = '') {
                              global $wp_filter, $wp_actions, $merged_filters, $wp_current_filter;
                          
                              if ( is_array($wp_actions) )
                                  $wp_actions[] = $tag;
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/plugin.php - About 1 hr to fix

                            Method Send has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function Send() {
                                $header = '';
                                $body = '';
                                $result = true;
                            
                            
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 1 hr to fix

                              Method ScanAssembly has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public void ScanAssembly(Assembly ass)
                                      {
                                          // Scan for and register handlers.
                                          var handlers = 
                                              from t in ass.GetTypes()
                              Severity: Minor
                              Found in Edument.CQRS/MessageDispatcher.cs - About 1 hr to fix

                                Function renderImageToCanvas has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        canvas,
                                        img,
                                        sourceX,
                                        sourceY,
                                        sourceWidth,
                                Severity: Major
                                Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

                                  Function renderImageToCanvas has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      api.renderImageToCanvas = function (canvas, img, sx, sy, sw, sh, dx, dy, dw, dh){
                                  Severity: Major
                                  Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

                                    Function updateModel has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    function updateModel($parse, $timeout, scope, ngModel, attr, fileChange, files, rejFiles, evt, noDelay) {
                                    Severity: Major
                                    Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 1 hr to fix

                                      Function updateModel has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      function updateModel($parse, $timeout, scope, ngModel, attr, fileChange, files, rejFiles, evt, noDelay) {
                                      Severity: Major
                                      Found in Web.Admin/z-scripts/ng-file-upload.js - About 1 hr to fix

                                        Function setOpacity has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                          Element.Methods.setOpacity = function(element, value) {
                                            function stripAlpha(filter){
                                              return filter.replace(/alpha\([^\)]*\)/gi,'');
                                            }
                                            element = $(element);
                                        Severity: Minor
                                        Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - 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