rilwis/meta-box

View on GitHub

Showing 115 of 254 total issues

File jquery.validate.js has 1254 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery Validation Plugin v1.20.0
 *
 * https://jqueryvalidation.org/
 *
Severity: Major
Found in js/validation/jquery.validate.js - About 3 days to fix

    File additional-methods.js has 858 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery Validation Plugin v1.20.0
     *
     * https://jqueryvalidation.org/
     *
    Severity: Major
    Found in js/validation/additional-methods.js - About 2 days to fix

      Method get_dashicons has 306 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function get_dashicons() {
              return [
                  'admin-appearance',
                  'admin-collapse',
                  'admin-comments',
      Severity: Major
      Found in src/Support/Data.php - About 1 day to fix

        File media.js has 418 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        ( function ( $, wp, _, rwmb, i18n ) {
            'use strict';
        
            var views = rwmb.views = rwmb.views || {},
                models = rwmb.models = rwmb.models || {},
        Severity: Minor
        Found in js/media.js - About 6 hrs to fix

          File Data.php has 356 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          namespace MetaBox\Support;
          
          class Data {
              public static function get_post_types() {
          Severity: Minor
          Found in src/Support/Data.php - About 4 hrs to fix

            File field.php has 315 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            use MetaBox\Support\Arr;
            
            /**
             * The field base class.
            Severity: Minor
            Found in inc/field.php - About 3 hrs to fix

              Method html has 85 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function html( $meta, $field ) {
                      $meta = wp_parse_args( $meta, [
                          'color'      => '',
                          'image'      => '',
                          'repeat'     => '',
              Severity: Major
              Found in inc/fields/background.php - About 3 hrs to fix

                File file.php has 305 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                defined( 'ABSPATH' ) || die;
                
                /**
                 * The file upload file which allows users to upload files via the default HTML <input type="file">.
                Severity: Minor
                Found in inc/fields/file.php - About 3 hrs to fix

                  Function rwmbModal has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $.fn.rwmbModal = function ( options = {} ) {
                          options = {
                              ...defaultOptions,
                              ...options
                          };
                  Severity: Major
                  Found in js/modal.js - About 3 hrs to fix

                    Function transform has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function transform() {
                            var $this = $( this ),
                                options = $this.data( 'options' );
                    
                            $this.removeClass( 'select2-hidden-accessible' ).removeAttr( 'data-select2-id' );
                    Severity: Major
                    Found in js/select-advanced.js - About 2 hrs to fix

                      Function validate has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          validate: function( options ) {
                      
                              // If nothing is selected, return nothing; can't chain anyway
                              if ( !this.length ) {
                                  if ( options && options.debug && window.console ) {
                      Severity: Major
                      Found in js/validation/jquery.validate.js - About 2 hrs to fix

                        RWMB_Field has 23 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        abstract class RWMB_Field {
                            public static function add_actions() {}
                        
                            public static function admin_enqueue_scripts() {}
                        
                        
                        Severity: Minor
                        Found in inc/field.php - About 2 hrs to fix

                          RW_Meta_Box has 23 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class RW_Meta_Box {
                              /**
                               * Meta box parameters.
                               *
                               * @var array
                          Severity: Minor
                          Found in inc/meta-box.php - About 2 hrs to fix

                            Function showLabel has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    showLabel: function( element, message ) {
                                        var place, group, errorID, v,
                                            error = this.errorsFor( element ),
                                            elementID = this.idOrName( element ),
                                            describedBy = $( element ).attr( "aria-describedby" );
                            Severity: Major
                            Found in js/validation/jquery.validate.js - About 2 hrs to fix

                              Method html has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function html( $meta, $field ) {
                                      if ( ! is_array( $meta ) ) {
                                          $meta = [ $meta ];
                                      }
                              
                              
                              Severity: Major
                              Found in inc/fields/autocomplete.php - About 2 hrs to fix

                                Function sliderAccess has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        sliderAccess: function(options){
                                            options = options || {};
                                            options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device
                                
                                            if(options.touchonly === true && !("ontouchend" in document)){
                                Severity: Major
                                Found in js/jqueryui/jquery-ui-sliderAccess.js - About 2 hrs to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                      if ( value === "" ||
                                          value === "00000000000" ||
                                          value === "11111111111" ||
                                          value === "22222222222" ||
                                          value === "33333333333" ||
                                  Severity: Critical
                                  Found in js/validation/additional-methods.js - About 2 hrs to fix

                                    Function rules has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        rules: function( command, argument ) {
                                            var element = this[ 0 ],
                                                isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
                                                settings, staticRules, existingRules, data, param, filtered;
                                    
                                    
                                    Severity: Major
                                    Found in js/validation/jquery.validate.js - About 2 hrs to fix

                                      Function normalizeRules has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          normalizeRules: function( rules, element ) {
                                      
                                              // Handle dependency check
                                              $.each( rules, function( prop, val ) {
                                      
                                      
                                      Severity: Major
                                      Found in js/validation/jquery.validate.js - About 2 hrs to fix

                                        Function check has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                check: function( element ) {
                                                    element = this.validationTargetFor( this.clean( element ) );
                                        
                                                    var rules = $( element ).rules(),
                                                        rulesCount = $.map( rules, function( n, i ) {
                                        Severity: Major
                                        Found in js/validation/jquery.validate.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language