CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        function wp_editPage($args) {
            // Items not escaped here will be escaped in editPost.
            $blog_id    = (int) $args[0];
            $page_id    = (int) $this->escape($args[1]);
            $username    = $this->escape($args[2]);
    Severity: Major
    Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
    Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 2599..2637

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 273.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        function wp_editPage($args) {
            // Items not escaped here will be escaped in editPost.
            $blog_id    = (int) $args[0];
            $page_id    = (int) $this->escape($args[1]);
            $username    = $this->escape($args[2]);
    Web.Admin/2014/wordpress/xmlrpc.php on lines 724..767

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 273.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    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;

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          snippets : function(evt) {
              var snippets = Language.snippets;    
              var trigger = this.getLastWord();
              for (var i=0; i<snippets.length; i++) {
                  if(snippets[i].input == trigger) {
      Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 132..147

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 221.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          snippets : function(evt) {
              var snippets = Language.snippets;    
              var trigger = this.getLastWord();
              for (var i=0; i<snippets.length; i++) {
                  if(snippets[i].input == trigger) {
      Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 132..147

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 221.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      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

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              function wp_getTags( $args ) {
                  $this->escape( $args );
          
                  $blog_id        = (int) $args[0];
                  $username        = $args[1];
          Web.Admin/2014/wordpress/xmlrpc.php on lines 877..910

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 271.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              function wp_getTags( $args ) {
                  $this->escape( $args );
          
                  $blog_id        = (int) $args[0];
                  $username        = $args[1];
          Severity: Major
          Found in Web.Admin/2014/wordpress/xmlrpc.php and 1 other location - About 1 day to fix
          Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php on lines 2737..2769

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 271.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          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
                            Severity
                            Category
                            Status
                            Source
                            Language