CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

    if ( isset( $_POST['tax'] ) ) {
        $taxonomy = sanitize_key( $_POST['tax'] );
        $tax = get_taxonomy( $taxonomy );
        if ( ! $tax )
            wp_die( 0 );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php on lines 93..102

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

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 walk_category_tree() {
    $args = func_get_args();
    // the user's options are the third parameter
    if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
        $walker = new Walker_Category;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/category-template.php and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/category-template.php on lines 737..746

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

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 walk_category_dropdown_tree() {
    $args = func_get_args();
    // the user's options are the third parameter
    if ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )
        $walker = new Walker_CategoryDropdown;
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/category-template.php and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/category-template.php on lines 719..728

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

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

    if ( isset( $_GET['tax'] ) ) {
        $taxonomy = sanitize_key( $_GET['tax'] );
        $tax = get_taxonomy( $taxonomy );
        if ( ! $tax )
            wp_die( 0 );
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/includes/ajax-actions.php on lines 691..700

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

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 $get has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

  function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $urlRouter,   $location,   $urlMatcherFactory) {
Severity: Major
Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

    Method wp_crop_image has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) {
    Severity: Major
    Found in Web.Admin/2014/wordpress/wp-admin/includes/image.php - About 1 hr to fix

      Method get_links_withrating has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
                                    $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 1 hr to fix

        Method get_linksbyname_withrating has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
                                            $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/deprecated.php - About 1 hr to fix

          Function select has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          select: function (evt){
                              try {
                                  var
                                        inp = flash.getInput(evt.flashId)
                                      , uid = api.uid(inp)
          Severity: Minor
          Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

            Function invoke has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function invoke(key, invocable, params) {
                    // Create a deferred for this invocation. Failures will propagate to the resolution as well.
                    var invocation = $q.defer(), waitParams = 0;
                    function onfailure(reason) {
                      invocation.reject(reason);
            Severity: Minor
            Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

              Function getInfo has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          getInfo: function (file, fn){
                              var info = {}, readers = _infoReader.concat();
              
                              if( api.isFile(file) ){
                                  (function _next(){
              Severity: Minor
              Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

                Function exec has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                UrlMatcher.prototype.exec = function (path, searchParams) {
                  var m = this.regexp.exec(path);
                  if (!m) return null;
                  searchParams = searchParams || {};
                
                
                Severity: Minor
                Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

                  Function registerState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function registerState(state) {
                      // Wrap a new object around the state so we can store our private details easily.
                      state = inherit(state, {
                        self: state,
                        resolve: state.resolve || {},
                  Severity: Minor
                  Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

                    Function detectVerticalSquash has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        loadImage.detectVerticalSquash = function (img, subsampled) {
                            var naturalHeight = img.naturalHeight || img.height,
                                canvas = document.createElement('canvas'),
                                context = canvas.getContext('2d'),
                                data,
                    Severity: Minor
                    Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

                      Function findState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function findState(stateOrName, base) {
                          if (!stateOrName) return undefined;
                      
                          var isStr = isString(stateOrName),
                              name  = isStr ? stateOrName : stateOrName.name,
                      Severity: Minor
                      Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

                        Function guestPackagesController has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            var guestPackagesController = function ($http, $q, $location, dataService) {
                                var url = $location.absUrl();
                                var lastSlash = url.lastIndexOf('/');
                                var year = url.slice(lastSlash + 1);
                        
                        
                        Severity: Minor
                        Found in Web.Admin/AdminApp/Controllers/controller.guestpackages.js - About 1 hr to fix

                          Function _getWH has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _getWH : function() {
                          
                                  var $container = this.$( 'container' ),
                                      $target = this.$( 'target' ),
                                      self = this,
                          Severity: Minor
                          Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

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

                                    initialize: function() {
                                        _.bindAll( this, 'setWidth' );
                            
                                        // Add the button view
                                        this.views.add( new revisions.view.Buttons({
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-admin/js/revisions.js - About 1 hr to fix

                              Function init has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      init : function(page, args) {
                                          $.extend( this, args || {} );
                                          $('#wpbody-content').css('overflow','hidden');
                                          $('.meta-box-sortables').sortable({
                                              placeholder: 'sortable-placeholder',
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-admin/js/postbox.dev.js - About 1 hr to fix

                                Function extend has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                Event.extend = (function() {
                                  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
                                    m[name] = Event.Methods[name].methodize();
                                    return m;
                                  });
                                Severity: Minor
                                Found in Web.Admin/2014/wordpress/wp-includes/js/prototype.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language