CaffGeek/MBACNationals

View on GitHub

Showing 5,566 of 7,504 total issues

Function get_site_transient has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function get_site_transient( $transient ) {

    /**
     * Filter the value of an existing site transient.
     *
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/option.php - About 1 hr 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 display_element has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {

        if ( !$element )
            return;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/classes.php - About 1 hr 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_most_active_blogs has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function get_most_active_blogs( $num = 10, $display = true ) {
    _deprecated_function( __FUNCTION__, '3.0' );

    $blogs = get_blog_list( 0, 'all', false ); // $blog_id -> $details
    if ( is_array( $blogs ) ) {
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-deprecated.php - About 1 hr 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 site_url has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function site_url($path = '', $scheme = null) {
    // should the list of allowed schemes be maintained elsewhere?
    $orig_scheme = $scheme;
    if ( !in_array($scheme, array('http', 'https')) ) {
        if ( ( 'login_post' == $scheme || 'rpc' == $scheme ) && ( force_ssl_login() || force_ssl_admin() ) )
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 1 hr 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 make_absolute_url has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    static function make_absolute_url( $maybe_relative_path, $url ) {
        if ( empty( $url ) )
            return $maybe_relative_path;

        // Check for a scheme
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/class-http.php - About 1 hr 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_comments_pagenum_link has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
    global $post, $wp_rewrite;

    $pagenum = (int) $pagenum;

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/link-template.php - About 1 hr 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 queue has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            queue: function (fn){
                var
                      _idx = 0
                    , _length = 0
                    , _fail = false
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

    Function workFn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function workFn() {
          var modules = currentSpec.$modules || [];
          var strictDi = !!currentSpec.$injectorStrict;
          modules.unshift('ngMock');
          modules.unshift('ng');
    Severity: Minor
    Found in Web.Admin/z-scripts/angular-mocks.js - About 1 hr to fix

      Function add has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              add: function(elem, to, from, hide) {
                  if ( !elem || Galleria.TOUCH ) {
                      return;
                  }
                  if (!idle.bound) {
      Severity: Minor
      Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

        Function _getSizes has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _getSizes: function() {
        
                var self = this,
                    norm = {
                        small: '72c',
        Severity: Minor
        Found in Web.Admin/2015/js/galleria/plugins/picasa/galleria.picasa.js - About 1 hr to fix

          Function save has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              save : function(id) {
                  var params, fields, page = $('.post_status_page').val() || '';
          
                  if( typeof(id) == 'object' )
                      id = this.getId(id);
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/js/inline-edit-post.dev.js - About 1 hr to fix

            Function start has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            start: function(e, ui) {
                                var height, width, parent, children, tempHolder;
            
                                // handle placement for rtl orientation
                                if ( api.isRTL )
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 1 hr to fix

              Function setNumSelection has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  setNumSelection : function(postid) {
                      var sel, elX = $('#imgedit-sel-width-' + postid), elY = $('#imgedit-sel-height-' + postid),
                          x = this.intval( elX.val() ), y = this.intval( elY.val() ),
                          img = $('#image-preview-' + postid), imgh = img.height(), imgw = img.width(),
                          sizer = this.hold['sizer'], x1, y1, x2, y2, ias = this.iasapi;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js - About 1 hr to fix

                Function request has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  request: function(url) {
                    this.url = url;
                    this.method = this.options.method;
                    var params = Object.clone(this.options.parameters);
                
                
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr to fix

                  Function convertParagraphToLi has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  function convertParagraphToLi(paragraphNode, listStartTextNode, listName, start) {
                                      var level = paragraphNode._listLevel || lastLevel;
                  
                                      // Handle list nesting
                                      if (level != lastLevel) {

                    Function editImage has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function editImage( img ) {
                            var frame, callback, metadata;
                    
                            if ( typeof wp === 'undefined' || ! wp.media ) {
                                editor.execCommand( 'mceImage' );

                      Function start has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  start: function(name, attrs) {
                                      if (!data.source1 && name == "param") {
                                          data.source1 = attrs.map.movie;
                                      }
                      
                      

                        Function renderColorPicker has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function renderColorPicker() {
                                var ctrl = this, colors, color, html, last, rows, cols, x, y, i;
                        
                                colors = mapColors();
                        
                        

                          Function initialize has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  initialize: function( element, options ) {
                                      var self = this,
                                          synchronizer = api.Element.synchronizer.html,
                                          type, update, refresh;
                          
                          
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/js/customize-base.js - About 1 hr to fix

                            Function setPlayer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    setPlayer: function(e, node) {
                                        // if the ready event fires on an empty node
                                        if ( ! node ) {
                                            return;
                                        }
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/js/mce-view.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language