rilwis/meta-box

View on GitHub

Showing 124 of 260 total issues

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

/*!
* jQuery Validation Plugin v1.21.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

      File content.php has 655 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php defined( 'ABSPATH' ) || die; ?>
       
      <header class="mb-dashboard__header" data-utm="header">
      <a class="mb-dashboard__logo" href="https://metabox.io" target="_blank">
      <svg viewBox="0 0 196 46" fill="none" xmlns="http://www.w3.org/2000/svg">
      Severity: Major
      Found in src/Dashboard/content.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 field.php has 330 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 75 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

                  RW_Meta_Box has 26 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 3 hrs to fix

                    RWMB_Field has 25 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

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

                        public static function html( array $meta, array $field ) : string {
                        $field_html = '';
                         
                        $count = count( $meta );
                        foreach ( $meta as $index => $sub_meta ) {
                        Severity: Minor
                        Found in inc/clone.php - 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

                          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 initUploader has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    initUploader: function ( $this ) {
                                    var self = this,
                                    $input = $this.closest( '.rwmb-input' ),
                                    $process = $input.find( '.rwmb-media-view .rwmb-media-progress' ),
                                    extensions = this.getExtensions().join( ',' ),
                                    Severity: Major
                                    Found in js/file-upload.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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language