CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Akismet has 39 functions (exceeds 20 allowed). Consider refactoring.
Open

class Akismet {
    const API_HOST = 'rest.akismet.com';
    const API_PORT = 80;
    const MAX_DELAY_BEFORE_MODERATION_EMAIL = 86400; // One day in seconds

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/class.akismet.php - About 5 hrs to fix

    WP_Theme has 39 functions (exceeds 20 allowed). Consider refactoring.
    Open

    final class WP_Theme implements ArrayAccess {
    
        /**
         * Headers for style.css files.
         *
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/class-wp-theme.php - About 5 hrs to fix

      Function collection has 129 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          wp.media.collection = function(attributes) {
              var collections = {};
      
              return _.extend( attributes, {
                  coerce : wp.media.coerce,
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/js/media-editor.js - About 5 hrs to fix

        Function _transitions has 128 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _transitions = (function() {
        
                var _slide = function(params, complete, fade, door) {
        
                    var easing = this.getOptions('easing'),
        Severity: Major
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 5 hrs to fix

          Function _transitions has 128 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _transitions = (function() {
          
                  var _slide = function(params, complete, fade, door) {
          
                      var easing = this.getOptions('easing'),
          Severity: Major
          Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 5 hrs to fix

            File misc.php has 380 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * Misc WordPress Administration API.
             *
             * @package WordPress
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/includes/misc.php - About 5 hrs to fix

              File jquery-migrate.js has 379 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*!
               * jQuery Migrate - v1.2.1 - 2013-05-08
               * https://github.com/jquery/jquery-migrate
               * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
               */
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery-migrate.js - About 5 hrs to fix

                Function extract has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                  function extract()
                  {
                    $v_result=1;
                
                    // ----- Reset the error handler
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php - About 5 hrs 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_read_image_metadata has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                function wp_read_image_metadata( $file ) {
                    if ( !file_exists( $file ) )
                        return false;
                
                    list(,,$sourceImageType) = getimagesize( $file );
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/includes/image.php - About 5 hrs 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_image has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                function wp_restore_image($post_id) {
                    $meta = wp_get_attachment_metadata($post_id);
                    $file = get_attached_file($post_id);
                    $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );
                    $restored = false;
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.php - About 5 hrs 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 diff has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                    function diff($from_lines, $to_lines)
                    {
                        array_walk($from_lines, array('Text_Diff', 'trimNewlines'));
                        array_walk($to_lines, array('Text_Diff', 'trimNewlines'));
                
                
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/Text/Diff/Engine/native.php - About 5 hrs 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 Serializer has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        var Serializer = (function () {
                            function Serializer() {
                            }
                            Serializer.serialize = function (input) {
                                var output = Serializer._serializeObject(input, "root");
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 5 hrs to fix

                  File theme-install.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /**
                   * WordPress Theme Install Administration API
                   *
                   * @package WordPress
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 5 hrs to fix

                    Function initSortables has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            initSortables : function() {
                                var currentDepth = 0, originalDepth, minDepth, maxDepth,
                                    prev, next, prevBottom, nextThreshold, helperHeight, transport,
                                    menuEdge = api.menuList.offset().left,
                                    body = $('body'), maxChildDepth,
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 5 hrs to fix

                      Method sanitize has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function sanitize($data, $type, $base = '')
                          {
                              $data = trim($data);
                              if ($data !== '' || $type & SIMPLEPIE_CONSTRUCT_IRI)
                              {
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Sanitize.php - About 5 hrs to fix

                        Method get_pages has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function &get_pages($args = '') {
                            global $wpdb;
                        
                            $defaults = array(
                                'child_of' => 0, 'sort_order' => 'ASC',
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/post.php - About 5 hrs to fix

                          Function updateHtml has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function updateHtml(html, data, updateAll) {
                                  var writer = new tinymce.html.Writer();
                                  var sourceCount = 0, hasImage;
                          
                                  function setAttributes(attrs, updatedAttrs) {

                            Function update has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                update : function() {
                                    var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null, DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html;
                            
                                    tinyMCEPopup.restoreSelection();
                                    el = ed.selection.getNode();

                              Method get has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function get( $hook_name = '' ) {
                              
                                      if ( is_a( $hook_name, 'WP_Screen' ) )
                                          return $hook_name;
                              
                              
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 5 hrs to fix

                                Method wp_mail has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
                                    // Compact the input, apply the filters, and extract them back out
                                    extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
                                
                                    if ( !is_array($attachments) )
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-includes/pluggable.php - About 5 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language