CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function merge_items has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    function merge_items($urls, $start = 0, $end = 0, $limit = 0)
    {
        if (is_array($urls) && sizeof($urls) > 0)
        {
            $items = array();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-simplepie.php - About 2 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 set_transient has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function set_transient( $transient, $value, $expiration = 0 ) {

    /**
     * Filter a specific transient before its value is set.
     *
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 2 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_option has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function get_option( $setting, $default = false ) {
    global $wpdb;

    // Allow plugins to short-circuit options.
    $pre = apply_filters( 'pre_option_' . $setting, false );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 2 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 query has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    function query() {
        $args = func_get_args();
        $method = array_shift($args);
        $request = new IXR_Request($method, $args);
        $length = $request->getLength();
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-IXR.php - About 2 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 update_blog_status has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
    global $wpdb;

    if ( null !== $deprecated  )
        _deprecated_argument( __FUNCTION__, '3.1' );
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-blogs.php - About 2 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 editor has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public static function editor( $content, $editor_id, $settings = array() ) {

        $set = self::parse_settings( $editor_id, $settings );
        $editor_class = ' class="' . trim( $set['editor_class'] . ' wp-editor-area' ) . '"';
        $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-wp-editor.php - About 2 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 recurse_dirsize has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function recurse_dirsize( $directory ) {
    $size = 0;

    $directory = untrailingslashit( $directory );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 2 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 global_terms has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function global_terms( $term_id, $deprecated = '' ) {
    global $wpdb;
    static $global_terms_recurse = null;

    if ( !global_terms_enabled() )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-functions.php - About 2 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 SmtpConnect has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

  function SmtpConnect() {
    if($this->smtp == NULL) {
      $this->smtp = new SMTP();
    }

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 2 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 SmtpSend has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

  function SmtpSend($header, $body) {
    include_once($this->PluginDir . 'class-smtp.php');
    $error = '';
    $bad_rcpt = array();

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-phpmailer.php - About 2 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 has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

       function($browser,   $rootScope,   $q,   $$q) {
    var repeatFns = [],
        nextRepeatId = 0,
        now = 0;

Severity: Major
Found in Web.Admin/z-scripts/angular-mocks.js - About 2 hrs to fix

    Function str has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function str(key, holder) {
    
    // Produce a string from holder[key].
    
            var i,          // The loop counter.
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-includes/js/json2.dev.js - About 2 hrs to fix

      File admin-bar.js has 280 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* jshint loopfunc: true */
      // use jQuery and hoverIntent if loaded
      if ( typeof(jQuery) != 'undefined' ) {
          if ( typeof(jQuery.fn.hoverIntent) == 'undefined' ) {
              /* jshint ignore:start */
      Severity: Minor
      Found in Web.Admin/2014/wordpress/wp-includes/js/admin-bar.js - About 2 hrs to fix

        Function onload has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    imgPreloader.onload = function(){
                    imgPreloader.onload = null;
        
                    // Resizing large images - orginal by Christian Montoya edited by me.
                    var pagesize = tb_getPageSize();
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/thickbox/thickbox.js - About 2 hrs to fix

          Function insertMedia has 68 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function insertMedia() {
              var fe, f = document.forms[0], h;
          
              tinyMCEPopup.restoreSelection();
          
          

            Function Grow has 68 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Effect.Grow = function(element) {
              element = $(element);
              var options = Object.extend({
                direction: 'center',
                moveTransition: Effect.Transitions.sinoidal,
            Severity: Major
            Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js - About 2 hrs to fix

              Method _wp_dashboard_recent_comments_row has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
                  $GLOBALS['comment'] =& $comment;
              
                  $comment_post_url = get_edit_post_link( $comment->comment_post_ID );
                  $comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID ));
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/dashboard.php - About 2 hrs to fix

                Method install_package has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function install_package($args = array()) {
                        global $wp_filesystem;
                        $defaults = array( 'source' => '', 'destination' => '', //Please always pass these
                                        'clear_destination' => false, 'clear_working' => false,
                                        'hook_extra' => array());
                Severity: Major
                Found in Web.Admin/2014/wordpress/wp-admin/includes/class-wp-upgrader.php - About 2 hrs to fix

                  Method list_plugin_updates has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function list_plugin_updates() {
                      global $wp_version;
                  
                      $cur_wp_version = preg_replace('/-.*$/', '', $wp_version);
                  
                  
                  Severity: Major
                  Found in Web.Admin/2014/wordpress/wp-admin/update-core.php - About 2 hrs to fix

                    Method Analyze has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function Analyze() {
                            $info = &$this->getid3->info;
                    
                            // http://www.volweb.cz/str/tags.htm
                    
                    
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/ID3/module.tag.lyrics3.php - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language