CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Function BigEndian2Float has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    public static function BigEndian2Float($byteword) {
        // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic
        // http://www.psc.edu/general/software/packages/ieee/ieee.html
        // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ID3/getid3.lib.php - About 3 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

Method __construct has 26 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function __construct($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Enclosure.php - About 3 hrs to fix

    Function wp_update_themes has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    function wp_update_themes( ) {
        global $wp_version;
    
        if( defined( 'WP_INSTALLING' ) )
            return false;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/update.php - About 3 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 image_get_intermediate_size has a Cognitive Complexity of 23 (exceeds 5 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 3 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_print_media_templates has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    function wp_print_media_templates() {
        global $is_IE;
        $class = 'media-modal wp-core-ui';
        if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
            $class .= ' ie7';
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/media-template.php - About 3 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

    Method SimplePie_Enclosure has 26 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function SimplePie_Enclosure($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null)
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 3 hrs to fix

      Function wpmu_validate_blog_signup has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

      function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
          global $wpdb, $domain;
      
          $current_site = get_current_site();
          $base = $current_site->path;
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 3 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 get_permalink has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

      function get_permalink($id = 0, $leavename = false) {
          $rewritecode = array(
              '%year%',
              '%monthnum%',
              '%day%',
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 3 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_explain_nonce has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

      function wp_explain_nonce( $action ) {
          if ( $action !== -1 && preg_match( '/([a-z]+)-([a-z]+)(_(.+))?/', $action, $matches ) ) {
              $verb = $matches[1];
              $noun = $matches[2];
      
      
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 3 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 start_el has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          function start_el(&$output, $category, $depth, $args) {
              extract($args);
      
              $cat_name = esc_attr( $category->name);
              $cat_name = apply_filters( 'list_cats', $cat_name, $category );
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 3 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

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

      (function (AI) {
          "use strict";
          (function (SessionState) {
              SessionState[SessionState["Start"] = 0] = "Start";
              SessionState[SessionState["End"] = 1] = "End";
      Severity: Major
      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
      Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 1480..1487

      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 100.

      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 (AI) {
          "use strict";
          (function (DataPointType) {
              DataPointType[DataPointType["Measurement"] = 0] = "Measurement";
              DataPointType[DataPointType["Aggregation"] = 1] = "Aggregation";
      Severity: Major
      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js and 1 other location - About 3 hrs to fix
      Web.Admin/z-scripts/ai.0.15.0-build46802.js on lines 712..719

      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 100.

      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 3 locations. Consider refactoring.
      Open

          2016: {
            Theme: 'theme-2016',
            Contingents: [ ...this.provinces ],
            Logo: 'http://mbacnationals.com/2016/images/Logo.png',
            Header: 'http://mbacnationals.com/2016/images/background.jpg',
      Severity: Major
      Found in Website/src/app/services/tournaments.service.ts and 2 other locations - About 3 hrs to fix
      Website/src/app/services/tournaments.service.ts on lines 130..149
      Website/src/app/services/tournaments.service.ts on lines 150..169

      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 100.

      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 3 locations. Consider refactoring.
      Open

          2014: {
            Theme: 'theme-2014',
            Contingents: [ ...this.provinces ],
            Logo: 'http://mbacnationals.com/2014/images/2014_logo.png',
            Header: 'http://mbacnationals.com/2014/images/header_bkg.jpg',
      Severity: Major
      Found in Website/src/app/services/tournaments.service.ts and 2 other locations - About 3 hrs to fix
      Website/src/app/services/tournaments.service.ts on lines 110..129
      Website/src/app/services/tournaments.service.ts on lines 130..149

      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 100.

      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 3 locations. Consider refactoring.
      Open

          2015: {
            Theme: 'theme-2015',
            Contingents: [ ...this.provinces ],
            Logo: 'http://mbacnationals.com/2015/images/2015_logo.png',
            Header: 'http://mbacnationals.com/2015/images/header_bkg.jpg',
      Severity: Major
      Found in Website/src/app/services/tournaments.service.ts and 2 other locations - About 3 hrs to fix
      Website/src/app/services/tournaments.service.ts on lines 110..129
      Website/src/app/services/tournaments.service.ts on lines 150..169

      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 100.

      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 editor_plugin.dev.js has 302 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * WordPress plugin.
       */
      
      (function() {

        File module.tag.id3v1.php has 302 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: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.id3v1.php - About 3 hrs to fix

          Function _setupReorderUI has 81 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _setupReorderUI: function() {
                      var self = this, selectSidebarItem, $moveWidgetArea,
                          $reorderNav, updateAvailableSidebars;
          
                      /**
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 3 hrs to fix

            Function addToolbar has 81 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function addToolbar(items) {
                        var toolbarItems = [], buttonGroup;
            
                        if (!items) {
                            return;

              Method install_theme_information has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function install_theme_information() {
                  //TODO: This function needs a LOT of UI work :)
                  global $tab, $themes_allowedtags;
              
                  $api = themes_api('theme_information', array('slug' => stripslashes( $_REQUEST['theme'] ) ));
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/theme-install.php - About 3 hrs to fix
                Severity
                Category
                Status
                Source
                Language