CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

File media-editor.js has 568 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* global getUserSetting, tinymce, QTags, wpActiveEditor */

// WordPress, TinyMCE, and Media
// -----------------------------
(function($, _){
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-editor.js - About 1 day to fix

    File meta-boxes.php has 566 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    // -- Post related Meta Boxes
    
    /**
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/meta-boxes.php - About 1 day to fix

      Method parse_query has 238 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function parse_query ($query) {
              if ( !empty($query) || !isset($this->query) ) {
                  $this->init();
                  if ( is_array($query) )
                      $this->query_vars = $query;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 1 day to fix

        Function export_wp has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
        Open

        function export_wp($author='') {
        global $wpdb, $post_ids, $post, $wp_taxonomies;
        
        do_action('export_wp');
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/includes/export.php - About 1 day 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_blog_details has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
        Open

        function get_blog_details( $fields = null, $get_all = true ) {
            global $wpdb;
        
            if ( is_array($fields ) ) {
                if ( isset($fields['blog_id']) ) {
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.php - About 1 day 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 getOnlyMPEGaudioInfo has 234 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getOnlyMPEGaudioInfo($avdataoffset, $BitrateHistogram=false) {
                // looks for synch, decodes MPEG audio header
        
                $info = &$this->getid3->info;
        
        
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.mp3.php - About 1 day to fix

          Function WordFilter has 233 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function WordFilter(editor) {
                  var settings = editor.settings;
          
                  editor.on('BeforePastePreProcess', function(e) {
                      var content = e.content, retainStyleProperties, validStyles;

            File ng-file-upload.js has 554 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**!
             * AngularJS file upload/drop directive and service with progress and abort
             * @author  Danial  <danial.farid@gmail.com>
             * @version 4.2.1
             */
            Severity: Major
            Found in Web.Admin/z-scripts/ng-file-upload.js - About 1 day to fix

              File option.php has 553 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /**
               * Option API
               *
               * @package WordPress
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 day to fix

                Function AppInsights has 231 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        var AppInsights = (function () {
                            function AppInsights(config) {
                                var _this = this;
                                this.config = config || {};
                                var defaults = AppInsights.defaultConfig;
                Severity: Major
                Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 day to fix

                  Method ParseRIFF has 231 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function ParseRIFF($startoffset, $maxoffset) {
                          $info = &$this->getid3->info;
                  
                          $RIFFchunk = false;
                          $FoundAllChunksWeNeed = false;
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.riff.php - About 1 day to fix

                    PHPMailer has 63 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class PHPMailer {
                    
                      /////////////////////////////////////////////////
                      // PROPERTIES, PUBLIC
                      /////////////////////////////////////////////////
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 1 day to fix

                      File image-edit.php has 548 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /**
                       * WordPress Image Editor
                       *
                       * @package WordPress
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-admin/includes/image-edit.php - About 1 day to fix

                        File module.audio-video.flv.php has 547 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /////////////////////////////////////////////////////////////////
                        /// getID3() by James Heinrich <info@getid3.org>               //
                        //  available at http://getid3.sourceforge.net                 //
                        //            or http://www.getid3.org                         //
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio-video.flv.php - About 1 day to fix

                          File class-wp-customize-control.php has 547 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * Customize Control Class
                           *
                           * @package WordPress
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/class-wp-customize-control.php - About 1 day to fix

                            Method single_row has 228 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function single_row( $post, $level = 0 ) {
                                    global $mode;
                                    static $alternate;
                            
                                    $global_post = get_post();

                              Function install_plugin_information has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function install_plugin_information() {
                                  global $tab;
                              
                                  $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));
                              
                              
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin-install.php - About 1 day 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 export_wp has 227 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function export_wp($author='') {
                              global $wpdb, $post_ids, $post, $wp_taxonomies;
                              
                              do_action('export_wp');
                              
                              
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-admin/includes/export.php - About 1 day to fix

                                Function _farbtastic has 225 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                jQuery._farbtastic = function (container, callback) {
                                  // Store farbtastic object
                                  var fb = this;
                                
                                  // Insert markup
                                Severity: Major
                                Found in Web.Admin/2014/wordpress/wp-admin/js/farbtastic.js - About 1 day to fix

                                  wp_xmlrpc_server has 62 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class wp_xmlrpc_server extends IXR_Server {
                                  
                                      /**
                                       * Register all of the XMLRPC methods that XMLRPC server understands.
                                       *
                                  Severity: Major
                                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 1 day to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language