CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method admin_page has 145 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function admin_page() {
?>
<div class="wrap" id="custom-background">
<h2><?php _e( 'Custom Background' ); ?></h2>

Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/custom-background.php - About 5 hrs to fix

    Method ParseVorbisComments has 145 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function ParseVorbisComments() {
            $info = &$this->getid3->info;
    
            $OriginalOffset = $this->ftell();
            $commentdataoffset = 0;
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.ogg.php - About 5 hrs to fix

      Method get_real_type has 145 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function get_real_type($find_handler = false)
          {
              // If it's Odeo, let's get it out of the way.
              if (substr(strtolower($this->get_link()), 0, 15) === 'http://odeo.com')
              {
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 5 hrs to fix

        Method request has 145 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function request($url, $args = array()) {
                $defaults = array(
                    'method' => 'GET', 'timeout' => 5,
                    'redirection' => 5, 'httpversion' => '1.0',
                    'blocking' => true,
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 5 hrs to fix

          Method install_plugin_information has 144 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function install_plugin_information() {
              global $tab;
          
              $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));
          
          
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-admin/includes/plugin-install.php - About 5 hrs to fix

            Method generate_rewrite_rules has 144 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) {
                    //build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2)/?
                    $feedregex2 = '';
                    foreach ( (array) $this->feeds as $feed_name) {
                        $feedregex2 .= $feed_name . '|';
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/rewrite.php - About 5 hrs to fix

              Function PopupWindow_showPopup has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

              function PopupWindow_showPopup(anchorname) {
                  this.getXYPosition(anchorname);
                  this.x += this.offsetX;
                  this.y += this.offsetY;
                  if (!this.populated && (this.contents != "")) {
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - 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 get_entries has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

                  function get_entries($process_post_func=NULL) {
                      set_magic_quotes_runtime(0);
              
                      $doing_entry = false;
                      $is_wxr_file = false;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/import/wordpress.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_title has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
                  global $wpdb, $wp_locale, $wp_query;
              
                  $cat = get_query_var('cat');
                  $tag = get_query_var('tag_id');
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/general-template.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_insert_attachment has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_insert_attachment($object, $file = false, $parent = 0) {
                  global $wpdb, $user_ID;
              
                  $defaults = array('post_status' => 'draft', 'post_type' => 'post', 'post_author' => $user_ID,
                      'ping_status' => get_option('default_ping_status'), 'post_parent' => 0,
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/post.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_convert_widget_settings has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

              function wp_convert_widget_settings($base_name, $option_name, $settings) {
                  // This test may need expanding.
                  $single = $changed = false;
                  if ( empty($settings) ) {
                      $single = true;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/widgets.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 get_links has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function get_links($rel = 'alternate')
                  {
                      if (!isset($this->data['links']))
                      {
                          $this->data['links'] = array();
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/SimplePie/Source.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 request has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

                  function request($url, $args = array()) {
                      $defaults = array(
                          'method' => 'GET', 'timeout' => 5,
                          'redirection' => 5, 'httpversion' => '1.0',
                          'blocking' => true,
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/http.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 get_links has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

                  function get_links($rel = 'alternate')
                  {
                      if (!isset($this->data['links']))
                      {
                          $this->data['links'] = array();
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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 get_links has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

                  function get_links($rel = 'alternate')
                  {
                      if (!isset($this->data['links']))
                      {
                          $this->data['links'] = array();
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.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

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

                  function SimplePie_Parse_Date()
                  {
                      $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
                      $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';
              
              
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php and 1 other location - About 5 hrs to fix
              Web.Admin/2014/wordpress/wp-includes/SimplePie/Parse/Date.php on lines 542..565

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

              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

                  public function __construct()
                  {
                      $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
                      $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';
              
              
              Web.Admin/2014/wordpress/wp-includes/class-simplepie.php on lines 13016..13039

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

              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

                      {
                          var ox = offset[0], oy = offset[1];
              
                          if (0 > x1 + ox) ox -= ox + x1;
                          if (0 > y1 + oy) oy -= oy + y1;
              Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 19..19

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

              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

              {var ox=offset[0],oy=offset[1];if(0>x1+ox)ox-=ox+x1;if(0>y1+oy)oy-=oy+y1;if(boundy<y2+oy)oy+=boundy-(y2+oy);if(boundx<x2+ox)ox+=boundx-(x2+ox);x1+=ox;x2+=ox;y1+=oy;y2+=oy;};function getCorner(ord)
              Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 205..218

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

              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 upload has 142 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          upload: function (options){
                              options = _extend({
                                    jsonp: 'callback'
                                  , prepare: api.F
                                  , beforeupload: api.F
              Severity: Major
              Found in Web.Admin/z-scripts/FileAPI.js - About 5 hrs to fix
                Severity
                Category
                Status
                Source
                Language