CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

File load.php has 364 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * These functions are needed to load WordPress.
 *
 * @internal This file must be parsable by PHP4.
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/load.php - About 4 hrs to fix

    Function animate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                animate : (function() {
    
                    // detect transition
                    var transition = (function( style ) {
                        var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
    Severity: Major
    Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 4 hrs to fix

      Function animate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  animate : (function() {
      
                      // detect transition
                      var transition = (function( style ) {
                          var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
      Severity: Major
      Found in Web.Admin/Content/galleria/galleria-1.4.2.js - About 4 hrs to fix

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

            function single_row( $item ) {
                global $status, $page, $s, $totals;
        
                list( $plugin_file, $plugin_data ) = $item;
                $context = $status;

          Method remove_accents has 117 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function remove_accents($string) {
              if ( !preg_match('/[\x80-\xff]/', $string) )
                  return $string;
          
              if (seems_utf8($string)) {
          Severity: Major
          Found in Web.Admin/2014/wordpress/wp-includes/formatting.php - About 4 hrs to fix

            Method pingback_ping has 116 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function pingback_ping($args) {
                    global $wpdb;
            
                    /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
                    do_action( 'xmlrpc_call', 'pingback.ping' );
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 4 hrs to fix

              Function ColorPicker has 115 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function ColorPicker() {
                  var windowMode = false;
                  // Create a new PopupWindow object
                  if (arguments.length==0) {
                      var divname = "colorPickerDiv";
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 4 hrs to fix

                Method parseMETAdata has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function parseMETAdata() {
                        $info = &$this->getid3->info;
                        do {
                            $BlockOffset   = $this->ftell();
                            $BlockHeader   = $this->fread(4);
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.audio.flac.php - About 4 hrs to fix

                  Function dw_getRandomImage has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function dw_getRandomImage(rObj, bReturn) {
                      var imgAr = rObj.images;  if (!imgAr ) return '';
                      var num = Math.floor( Math.random() * imgAr.length );
                      var imgStr = '';   var imgFile = imgAr[ num ];
                      rObj.num = num; // hold which img selected (for ctr)
                  Severity: Minor
                  Found in Web.Admin/2015/js/dw_rotator_aux.js - About 4 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 dw_getRandomImage has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function dw_getRandomImage(rObj, bReturn) {
                      var imgAr = rObj.images;  if (!imgAr ) return '';
                      var num = Math.floor( Math.random() * imgAr.length );
                      var imgStr = '';   var imgFile = imgAr[ num ];
                      rObj.num = num; // hold which img selected (for ctr)
                  Severity: Minor
                  Found in Web.Admin/2014/js/dw_rotator_aux.js - About 4 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 generatePreview has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function generatePreview(c) {
                      var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh;
                  
                      p.innerHTML = '<!-- x --->';
                  
                  

                  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 make_site_theme_from_default has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function make_site_theme_from_default($theme_name, $template) {
                      $site_dir = WP_CONTENT_DIR . "/themes/$template";
                      $default_dir = WP_CONTENT_DIR . '/themes/default';
                  
                      // Copy files from the default theme to the site theme.
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/upgrade.php - About 4 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 add_meta_box has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null) {
                      global $wp_meta_boxes;
                  
                      if ( !isset($wp_meta_boxes) )
                          $wp_meta_boxes = array();
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/template.php - About 4 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_ajax_replyto_comment has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function wp_ajax_replyto_comment( $action ) {
                      global $wp_list_table, $wpdb;
                      if ( empty( $action ) )
                          $action = 'replyto-comment';
                  
                  
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php - About 4 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 pingback_ping has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function pingback_ping($args) {
                          global $wpdb;
                  
                          do_action('xmlrpc_call', 'pingback.ping');
                  
                  
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/xmlrpc.php - About 4 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 auto_check_update_meta has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function auto_check_update_meta( $id, $comment ) {
                  
                          // failsafe for old WP versions
                          if ( !function_exists('add_comment_meta') )
                              return false;
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-content/plugins/akismet/class.akismet.php - About 4 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 mw_getPost has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function mw_getPost($args) {
                  
                          $this->escape($args);
                  
                          $post_ID     = (int) $args[0];
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-wp-xmlrpc-server.php - About 4 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_kses_attr has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function wp_kses_attr($element, $attr, $allowed_html, $allowed_protocols) {
                      # Is there a closing XHTML slash at the end of the attributes?
                  
                      $xhtml_slash = '';
                      if (preg_match('%\s/\s*$%', $attr))
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/kses.php - About 4 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 load has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function load()
                      {
                          if ($this->mysql && ($query = mysql_query('SELECT `items`, `data` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($row = mysql_fetch_row($query)))
                          {
                              $data = unserialize($row[1]);
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 4 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 absolutize has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function absolutize($base, $relative)
                      {
                          $relative = (string) $relative;
                          if ($relative !== '')
                          {
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 4 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

                  Severity
                  Category
                  Status
                  Source
                  Language