mambax7/extgallery

View on GitHub
assets/js/ml-slider/ml-slider.php

Summary

Maintainability
F
1 wk
Test Coverage

custom_media_upload_tab_name accesses the super-global variable $_GET.
Open

    public function custom_media_upload_tab_name($tabs)
    {
        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];

        // restrict our tab changes to the meta slider plugin page
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

admin_process accesses the super-global variable $_GET.
Open

    public function admin_process()
    {
        // this function should only ever be called from the Meta Slider admin page.
        if (!is_admin()) {
            return;
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

custom_media_upload_tab_name accesses the super-global variable $_GET.
Open

    public function custom_media_upload_tab_name($tabs)
    {
        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];

        // restrict our tab changes to the meta slider plugin page
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

custom_media_uploader_tabs accesses the super-global variable $_GET.
Open

    public function custom_media_uploader_tabs($strings)
    {
        //update strings
        if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
            $strings['insertMediaTitle'] = __('Image', 'metaslider');
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

custom_media_upload_tab_name accesses the super-global variable $_GET.
Open

    public function custom_media_upload_tab_name($tabs)
    {
        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];

        // restrict our tab changes to the meta slider plugin page
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

custom_media_upload_tab_name accesses the super-global variable $_GET.
Open

    public function custom_media_upload_tab_name($tabs)
    {
        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];

        // restrict our tab changes to the meta slider plugin page
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

admin_process accesses the super-global variable $_REQUEST.
Open

    public function admin_process()
    {
        // this function should only ever be called from the Meta Slider admin page.
        if (!is_admin()) {
            return;
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

render_admin_page accesses the super-global variable $_GET.
Open

    public function render_admin_page()
    {
        $this->admin_process();
        $this->go_pro_cta();
        $this->system_check();
Severity: Minor
Found in assets/js/ml-slider/ml-slider.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Method render_admin_page has 535 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render_admin_page()
    {
        $this->admin_process();
        $this->go_pro_cta();
        $this->system_check();
Severity: Major
Found in assets/js/ml-slider/ml-slider.php - About 2 days to fix

    File ml-slider.php has 1047 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /*
     * Plugin Name: Meta Slider
     * Plugin URI: http://www.metaslider.com
     * Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
    Severity: Major
    Found in assets/js/ml-slider/ml-slider.php - About 2 days to fix

      Function build_settings_rows has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
      Open

          public function build_settings_rows($aFields)
          {
              // order the fields by priority
              uasort($aFields, [$this, 'compare_elems']);
      
      
      Severity: Minor
      Found in assets/js/ml-slider/ml-slider.php - About 5 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 render_admin_page has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public function render_admin_page()
          {
              $this->admin_process();
              $this->go_pro_cta();
              $this->system_check();
      Severity: Minor
      Found in assets/js/ml-slider/ml-slider.php - About 3 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

      MetaSliderPlugin has 30 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class MetaSliderPlugin
      {
          /** Current Slider **/
          public $slider = null;
      
      
      Severity: Minor
      Found in assets/js/ml-slider/ml-slider.php - About 3 hrs to fix

        The class MetaSliderPlugin has an overall complexity of 123 which is very high. The configured complexity threshold is 50.
        Open

        class MetaSliderPlugin
        {
            /** Current Slider **/
            public $slider = null;
        
        
        Severity: Minor
        Found in assets/js/ml-slider/ml-slider.php by phpmd

        The class MetaSliderPlugin has 21 public methods. Consider refactoring MetaSliderPlugin to keep number of public methods under 10.
        Open

        class MetaSliderPlugin
        {
            /** Current Slider **/
            public $slider = null;
        
        
        Severity: Minor
        Found in assets/js/ml-slider/ml-slider.php by phpmd

        TooManyPublicMethods

        Since: 0.1

        A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        Example

        Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

        The class MetaSliderPlugin has 28 non-getter- and setter-methods. Consider refactoring MetaSliderPlugin to keep number of methods under 25.
        Open

        class MetaSliderPlugin
        {
            /** Current Slider **/
            public $slider = null;
        
        
        Severity: Minor
        Found in assets/js/ml-slider/ml-slider.php by phpmd

        TooManyMethods

        Since: 0.1

        A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        The default was changed from 10 to 25 in PHPMD 2.3.

        Example

        Source https://phpmd.org/rules/codesize.html#toomanymethods

        Method build_settings_rows has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function build_settings_rows($aFields)
            {
                // order the fields by priority
                uasort($aFields, [$this, 'compare_elems']);
        
        
        Severity: Major
        Found in assets/js/ml-slider/ml-slider.php - About 2 hrs to fix

          Method get_easing_options has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function get_easing_options()
              {
                  $options = [
                      'linear',
                      'swing',
          Severity: Minor
          Found in assets/js/ml-slider/ml-slider.php - About 1 hr to fix

            Method admin_footer has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function admin_footer()
                {
                    global $pagenow;
            
                    // Only run in post/page creation and edit screens
            Severity: Minor
            Found in assets/js/ml-slider/ml-slider.php - About 1 hr to fix

              Function custom_media_upload_tab_name has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function custom_media_upload_tab_name($tabs)
                  {
                      $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
              
                      // restrict our tab changes to the meta slider plugin page
              Severity: Minor
              Found in assets/js/ml-slider/ml-slider.php - About 45 mins 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 admin_process has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function admin_process()
                  {
                      // this function should only ever be called from the Meta Slider admin page.
                      if (!is_admin()) {
                          return;
              Severity: Minor
              Found in assets/js/ml-slider/ml-slider.php - About 35 mins 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 admin_footer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function admin_footer()
                  {
                      global $pagenow;
              
                      // Only run in post/page creation and edit screens
              Severity: Minor
              Found in assets/js/ml-slider/ml-slider.php - About 35 mins 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

              Avoid too many return statements within this method.
              Open

                              return new MetaFlexSlider($id, $shortcode_settings);
              Severity: Major
              Found in assets/js/ml-slider/ml-slider.php - About 30 mins to fix

                Function custom_media_uploader_tabs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function custom_media_uploader_tabs($strings)
                    {
                        //update strings
                        if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
                            $strings['insertMediaTitle'] = __('Image', 'metaslider');
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php - About 25 mins 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

                The class MetaSliderPlugin has 1348 lines of code. Current threshold is 1000. Avoid really long classes.
                Open

                class MetaSliderPlugin
                {
                    /** Current Slider **/
                    public $slider = null;
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                The method build_settings_rows() has an NPath complexity of 20737. The configured NPath complexity threshold is 200.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                NPathComplexity

                Since: 0.1

                The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                Example

                class Foo {
                    function bar() {
                        // lots of complicated code
                    }
                }

                Source https://phpmd.org/rules/codesize.html#npathcomplexity

                The method render_admin_page() has 558 lines of code. Current threshold is set to 100. Avoid really long methods.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                The method render_admin_page() has an NPath complexity of 15728640. The configured NPath complexity threshold is 200.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                NPathComplexity

                Since: 0.1

                The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                Example

                class Foo {
                    function bar() {
                        // lots of complicated code
                    }
                }

                Source https://phpmd.org/rules/codesize.html#npathcomplexity

                The method build_settings_rows() has 111 lines of code. Current threshold is set to 100. Avoid really long methods.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                The method build_settings_rows() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CyclomaticComplexity

                Since: 0.1

                Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                Example

                // Cyclomatic Complexity = 11
                class Foo {
                1   public function example() {
                2       if ($a == $b) {
                3           if ($a1 == $b1) {
                                fiddle();
                4           } elseif ($a2 == $b2) {
                                fiddle();
                            } else {
                                fiddle();
                            }
                5       } elseif ($c == $d) {
                6           while ($c == $d) {
                                fiddle();
                            }
                7        } elseif ($e == $f) {
                8           for ($n = 0; $n < $h; $n++) {
                                fiddle();
                            }
                        } else {
                            switch ($z) {
                9               case 1:
                                    fiddle();
                                    break;
                10              case 2:
                                    fiddle();
                                    break;
                11              case 3:
                                    fiddle();
                                    break;
                                default:
                                    fiddle();
                                    break;
                            }
                        }
                    }
                }

                Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                The method render_admin_page() has a Cyclomatic Complexity of 32. The configured cyclomatic complexity threshold is 10.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CyclomaticComplexity

                Since: 0.1

                Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                Example

                // Cyclomatic Complexity = 11
                class Foo {
                1   public function example() {
                2       if ($a == $b) {
                3           if ($a1 == $b1) {
                                fiddle();
                4           } elseif ($a2 == $b2) {
                                fiddle();
                            } else {
                                fiddle();
                            }
                5       } elseif ($c == $d) {
                6           while ($c == $d) {
                                fiddle();
                            }
                7        } elseif ($e == $f) {
                8           for ($n = 0; $n < $h; $n++) {
                                fiddle();
                            }
                        } else {
                            switch ($z) {
                9               case 1:
                                    fiddle();
                                    break;
                10              case 2:
                                    fiddle();
                                    break;
                11              case 3:
                                    fiddle();
                                    break;
                                default:
                                    fiddle();
                                    break;
                            }
                        }
                    }
                }

                Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                Avoid using undefined variables such as '$return' which will lead to PHP notices.
                Open

                        return $return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                UndefinedVariable

                Since: 2.8.0

                Detects when a variable is used that has not been defined before.

                Example

                class Foo
                {
                    private function bar()
                    {
                        // $message is undefined
                        echo $message;
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                Avoid using undefined variables such as '$return' which will lead to PHP notices.
                Open

                            $return[$option] = [
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                UndefinedVariable

                Since: 2.8.0

                Detects when a variable is used that has not been defined before.

                Example

                class Foo
                {
                    private function bar()
                    {
                        // $message is undefined
                        echo $message;
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                Missing class import via use statement (line '409', column '28').
                Open

                                return new MetaCoinSlider($id, $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '415', column '28').
                Open

                                return new MetaNivoSlider($id, $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '418', column '28').
                Open

                                return new MetaResponsiveSlider($id, $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '421', column '28').
                Open

                                return new MetaFlexSlider($id, $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '97', column '28').
                Open

                        $systemCheck = new MetaSliderSystemCheck();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '481', column '29').
                Open

                            $slider   = new MetaSlider($id, []);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '412', column '28').
                Open

                                return new MetaFlexSlider($id, $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '151', column '22').
                Open

                        $image = new MetaImageSlide();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '540', column '26').
                Open

                        $the_query = new WP_Query($args);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Missing class import via use statement (line '576', column '26').
                Open

                        $the_query = new WP_Query($args);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                MissingImport

                Since: 2.7.0

                Importing all external classes in a file through use statements makes them clearly visible.

                Example

                function make() {
                    return new \stdClass();
                }

                Source http://phpmd.org/rules/cleancode.html#MissingImport

                Avoid using static access to class '\Xmf\Request' in method 'custom_media_uploader_tabs'.
                Open

                        if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                StaticAccess

                Since: 1.4.0

                Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                Example

                class Foo
                {
                    public function bar()
                    {
                        Bar::baz();
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#staticaccess

                Avoid using static access to class '\Xmf\Request' in method 'admin_process'.
                Open

                        if (\Xmf\Request::hasVar('id', 'REQUEST')) {
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                StaticAccess

                Since: 1.4.0

                Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                Example

                class Foo
                {
                    public function bar()
                    {
                        Bar::baz();
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#staticaccess

                Avoid using static access to class '\Xmf\Request' in method 'admin_process'.
                Open

                        if (\Xmf\Request::hasVar('delete', 'GET')) {
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                StaticAccess

                Since: 1.4.0

                Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                Example

                class Foo
                {
                    public function bar()
                    {
                        Bar::baz();
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#staticaccess

                Avoid using static access to class '\Xmf\Request' in method 'admin_process'.
                Open

                        if (\Xmf\Request::hasVar('add', 'GET')) {
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                StaticAccess

                Since: 1.4.0

                Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                Example

                class Foo
                {
                    public function bar()
                    {
                        Bar::baz();
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#staticaccess

                The method render_admin_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                Open

                                } else {
                                    echo "<h3 class='nav-tab-wrapper'>";
                                    echo "<a href='{$add_url}' id='create_new_tab' class='nav-tab'>+</a>";
                                    echo "<div class='bubble'>" . __('Create your first slideshow') . '</div>';
                                    echo '</h3>';
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ElseExpression

                Since: 1.4.0

                An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                Example

                class Foo
                {
                    public function bar($flag)
                    {
                        if ($flag) {
                            // one branch
                        } else {
                            // another branch
                        }
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#elseexpression

                The method admin_footer uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                Open

                                    } else {
                                        _e('No slideshows found', 'metaslider');
                                    } ?>
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ElseExpression

                Since: 1.4.0

                An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                Example

                class Foo
                {
                    public function bar($flag)
                    {
                        if ($flag) {
                            // one branch
                        } else {
                            // another branch
                        }
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#elseexpression

                The method render_admin_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                Open

                                            } else {
                                                echo "<a href='?page=metaslider&amp;id={$tab['id']}' class='nav-tab'>" . $tab['title'] . '</a>';
                                            }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ElseExpression

                Since: 1.4.0

                An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                Example

                class Foo
                {
                    public function bar($flag)
                    {
                        if ($flag) {
                            // one branch
                        } else {
                            // another branch
                        }
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#elseexpression

                The method render_admin_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                Open

                                    } else {
                                        echo "<h3 class='nav-tab-wrapper'>";
                                        foreach ($tabs as $tab) {
                                            if ($tab['active']) {
                                                echo "<div class='nav-tab nav-tab-active'><input type='text' name='title'  value='" . $tab['title'] . "' onfocus='this.style.width = ((this.value.length + 1) * 9) + \"px\"' ></div>";
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ElseExpression

                Since: 1.4.0

                An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                Example

                class Foo
                {
                    public function bar($flag)
                    {
                        if ($flag) {
                            // one branch
                        } else {
                            // another branch
                        }
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#elseexpression

                Avoid using static access to class '\Xmf\Request' in method 'render_admin_page'.
                Open

                                        if (\Xmf\Request::hasVar('add', 'GET') && 'true' === $_GET['add']) {
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                StaticAccess

                Since: 1.4.0

                Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                Example

                class Foo
                {
                    public function bar()
                    {
                        Bar::baz();
                    }
                }

                Source https://phpmd.org/rules/cleancode.html#staticaccess

                Avoid unused local variables such as '$image'.
                Open

                        $image = new MetaImageSlide();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                UnusedLocalVariable

                Since: 0.2

                Detects when a local variable is declared and/or assigned, but not used.

                Example

                class Foo {
                    public function doSomething()
                    {
                        $i = 5; // Unused
                    }
                }

                Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                Avoid unused private methods such as 'compare_elems'.
                Open

                    private function compare_elems($elem1, $elem2)
                    {
                        return $elem1['priority'] > $elem2['priority'];
                    }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                UnusedPrivateMethod

                Since: 0.2

                Unused Private Method detects when a private method is declared but is unused.

                Example

                class Something
                {
                    private function foo() {} // unused
                }

                Source https://phpmd.org/rules/unusedcode.html#unusedprivatemethod

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

                                                                    'sph'              => [
                                                                        'priority' => 120,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 1 other location - About 1 hr to fix
                assets/js/ml-slider/ml-slider.php on lines 1121..1133

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

                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

                                                                    'spw'              => [
                                                                        'priority' => 110,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 1 other location - About 1 hr to fix
                assets/js/ml-slider/ml-slider.php on lines 1134..1146

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'delay'            => [
                                                                        'priority' => 80,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 500,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 899..911
                assets/js/ml-slider/ml-slider.php on lines 912..924
                assets/js/ml-slider/ml-slider.php on lines 1095..1107
                assets/js/ml-slider/ml-slider.php on lines 1108..1120
                assets/js/ml-slider/ml-slider.php on lines 1184..1196
                assets/js/ml-slider/ml-slider.php on lines 1210..1222

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'width'      => [
                                                                        'priority' => 10,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 912..924
                assets/js/ml-slider/ml-slider.php on lines 1082..1094
                assets/js/ml-slider/ml-slider.php on lines 1095..1107
                assets/js/ml-slider/ml-slider.php on lines 1108..1120
                assets/js/ml-slider/ml-slider.php on lines 1184..1196
                assets/js/ml-slider/ml-slider.php on lines 1210..1222

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'titleSpeed'       => [
                                                                        'priority' => 190,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 899..911
                assets/js/ml-slider/ml-slider.php on lines 912..924
                assets/js/ml-slider/ml-slider.php on lines 1082..1094
                assets/js/ml-slider/ml-slider.php on lines 1095..1107
                assets/js/ml-slider/ml-slider.php on lines 1108..1120
                assets/js/ml-slider/ml-slider.php on lines 1184..1196

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'slices'           => [
                                                                        'priority' => 100,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 899..911
                assets/js/ml-slider/ml-slider.php on lines 912..924
                assets/js/ml-slider/ml-slider.php on lines 1082..1094
                assets/js/ml-slider/ml-slider.php on lines 1095..1107
                assets/js/ml-slider/ml-slider.php on lines 1184..1196
                assets/js/ml-slider/ml-slider.php on lines 1210..1222

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'height'     => [
                                                                        'priority' => 20,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 899..911
                assets/js/ml-slider/ml-slider.php on lines 1082..1094
                assets/js/ml-slider/ml-slider.php on lines 1095..1107
                assets/js/ml-slider/ml-slider.php on lines 1108..1120
                assets/js/ml-slider/ml-slider.php on lines 1184..1196
                assets/js/ml-slider/ml-slider.php on lines 1210..1222

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'animationSpeed'   => [
                                                                        'priority' => 90,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 899..911
                assets/js/ml-slider/ml-slider.php on lines 912..924
                assets/js/ml-slider/ml-slider.php on lines 1082..1094
                assets/js/ml-slider/ml-slider.php on lines 1108..1120
                assets/js/ml-slider/ml-slider.php on lines 1184..1196
                assets/js/ml-slider/ml-slider.php on lines 1210..1222

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

                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 7 locations. Consider refactoring.
                Open

                                                                    'sDelay'           => [
                                                                        'priority' => 170,
                                                                        'type'     => 'number',
                                                                        'size'     => 3,
                                                                        'min'      => 0,
                Severity: Major
                Found in assets/js/ml-slider/ml-slider.php and 6 other locations - About 55 mins to fix
                assets/js/ml-slider/ml-slider.php on lines 899..911
                assets/js/ml-slider/ml-slider.php on lines 912..924
                assets/js/ml-slider/ml-slider.php on lines 1082..1094
                assets/js/ml-slider/ml-slider.php on lines 1095..1107
                assets/js/ml-slider/ml-slider.php on lines 1108..1120
                assets/js/ml-slider/ml-slider.php on lines 1210..1222

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

                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

                Each class must be in a namespace of at least one level (a top-level vendor name)
                Open

                class MetaSliderPlugin

                Avoid variables with short names like $id. Configured minimum length is 3.
                Open

                    public function set_slider($id, $shortcode_settings = [])
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ShortVariable

                Since: 0.2

                Detects when a field, local, or parameter has a very short name.

                Example

                class Something {
                    private $q = 15; // VIOLATION - Field
                    public static function main( array $as ) { // VIOLATION - Formal
                        $r = 20 + $this->q; // VIOLATION - Local
                        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                            $r += $this->q;
                        }
                    }
                }

                Source https://phpmd.org/rules/naming.html#shortvariable

                Avoid variables with short names like $id. Configured minimum length is 3.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ShortVariable

                Since: 0.2

                Detects when a field, local, or parameter has a very short name.

                Example

                class Something {
                    private $q = 15; // VIOLATION - Field
                    public static function main( array $as ) { // VIOLATION - Formal
                        $r = 20 + $this->q; // VIOLATION - Local
                        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                            $r += $this->q;
                        }
                    }
                }

                Source https://phpmd.org/rules/naming.html#shortvariable

                The parameter $sort_key is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseParameterName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name parameters.

                Example

                class ClassName {
                    public function doSomething($user_name) {
                    }
                }

                Source

                Avoid variables with short names like $id. Configured minimum length is 3.
                Open

                    private function delete_slider($id)
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ShortVariable

                Since: 0.2

                Detects when a field, local, or parameter has a very short name.

                Example

                class Something {
                    private $q = 15; // VIOLATION - Field
                    public static function main( array $as ) { // VIOLATION - Formal
                        $r = 20 + $this->q; // VIOLATION - Local
                        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                            $r += $this->q;
                        }
                    }
                }

                Source https://phpmd.org/rules/naming.html#shortvariable

                The parameter $shortcode_settings is not named in camelCase.
                Open

                    public function set_slider($id, $shortcode_settings = [])
                    {
                        $type = 'flex';
                
                        $settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseParameterName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name parameters.

                Example

                class ClassName {
                    public function doSomething($user_name) {
                    }
                }

                Source

                The parameter $shortcode_settings is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseParameterName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name parameters.

                Example

                class ClassName {
                    public function doSomething($user_name) {
                    }
                }

                Source

                Avoid variables with short names like $id. Configured minimum length is 3.
                Open

                            $slider   = new MetaSlider($id, []);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                ShortVariable

                Since: 0.2

                Detects when a field, local, or parameter has a very short name.

                Example

                class Something {
                    private $q = 15; // VIOLATION - Field
                    public static function main( array $as ) { // VIOLATION - Formal
                        $r = 20 + $this->q; // VIOLATION - Local
                        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                            $r += $this->q;
                        }
                    }
                }

                Source https://phpmd.org/rules/naming.html#shortvariable

                A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 22 and the first side effect is on line 19.
                Open

                <?php

                Method name "MetaSliderPlugin::custom_media_uploader_tabs" is not in camel caps format
                Open

                    public function custom_media_uploader_tabs($strings)

                The CASE body must start on the line following the statement
                Open

                            case ('coin'):

                Method name "MetaSliderPlugin::all_meta_sliders" is not in camel caps format
                Open

                    private function all_meta_sliders($sort_key = 'date')

                Method name "MetaSliderPlugin::admin_process" is not in camel caps format
                Open

                    public function admin_process()

                Method name "MetaSliderPlugin::delete_slider" is not in camel caps format
                Open

                    private function delete_slider($id)

                Method name "MetaSliderPlugin::custom_media_upload_tab_name" is not in camel caps format
                Open

                    public function custom_media_upload_tab_name($tabs)

                Method name "MetaSliderPlugin::register_admin_styles" is not in camel caps format
                Open

                    public function register_admin_styles()

                Method name "MetaSliderPlugin::register_admin_scripts" is not in camel caps format
                Open

                    public function register_admin_scripts()

                Method name "MetaSliderPlugin::register_shortcode" is not in camel caps format
                Open

                    public function register_shortcode($atts)

                Method name "MetaSliderPlugin::set_slider" is not in camel caps format
                Open

                    public function set_slider($id, $shortcode_settings = [])

                Method name "MetaSliderPlugin::find_slider" is not in camel caps format
                Open

                    private function find_slider($orderby, $order)

                Method name "MetaSliderPlugin::upgrade_to_pro" is not in camel caps format
                Open

                    public function upgrade_to_pro($links)

                The CASE body must start on the line following the statement
                Open

                            case ('nivo'):

                Method name "MetaSliderPlugin::register_admin_menu" is not in camel caps format
                Open

                    public function register_admin_menu()

                Method name "MetaSliderPlugin::help_tab" is not in camel caps format
                Open

                    public function help_tab()

                The CASE body must start on the line following the statement
                Open

                            case ('flex'):

                Method name "MetaSliderPlugin::metaslider_pro_tab" is not in camel caps format
                Open

                    public function metaslider_pro_tab()

                Method name "MetaSliderPlugin::register_post_type" is not in camel caps format
                Open

                    public function register_post_type()

                Method name "MetaSliderPlugin::load_plugin_textdomain" is not in camel caps format
                Open

                    public function load_plugin_textdomain()

                Method name "MetaSliderPlugin::build_settings_rows" is not in camel caps format
                Open

                    public function build_settings_rows($aFields)

                Method name "MetaSliderPlugin::register_slide_types" is not in camel caps format
                Open

                    private function register_slide_types()

                Method name "MetaSliderPlugin::go_pro_cta" is not in camel caps format
                Open

                    public function go_pro_cta()

                Method name "MetaSliderPlugin::create_slider" is not in camel caps format
                Open

                    private function create_slider($type, $id, $shortcode_settings)

                The DEFAULT body must start on the line following the statement
                Open

                            default:

                Method name "MetaSliderPlugin::add_slider" is not in camel caps format
                Open

                    private function add_slider()

                Method name "MetaSliderPlugin::system_check" is not in camel caps format
                Open

                    public function system_check()

                Method name "MetaSliderPlugin::register_taxonomy" is not in camel caps format
                Open

                    public function register_taxonomy()

                The CASE body must start on the line following the statement
                Open

                            case ('responsive'):

                Method name "MetaSliderPlugin::compare_elems" is not in camel caps format
                Open

                    private function compare_elems($elem1, $elem2)

                Method name "MetaSliderPlugin::get_easing_options" is not in camel caps format
                Open

                    private function get_easing_options()

                Method name "MetaSliderPlugin::render_admin_page" is not in camel caps format
                Open

                    public function render_admin_page()

                Method name "MetaSliderPlugin::admin_footer" is not in camel caps format
                Open

                    public function admin_footer()

                Method name "MetaSliderPlugin::insert_metaslider_button" is not in camel caps format
                Open

                    public function insert_metaslider_button($context)

                Line exceeds 120 characters; contains 159 characters
                Open

                        echo "<a class='probutton' href='{$link}' target='_blank'>Get <span class='logo'><strong>Meta</strong>Slider</span><span class='super'>Pro</span></a>";

                Line exceeds 120 characters; contains 215 characters
                Open

                                $return .= "<tr><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='checkbox' name='settings[{$id}]' {$row['checked']} >";

                Line exceeds 120 characters; contains 143 characters
                Open

                            'useWithCaution' => __("Caution: This setting is for advanced developers only. If you're unsure, leave it checked.", 'metaslider'),

                Line exceeds 120 characters; contains 169 characters
                Open

                                    $navigation_row .= "<li><label><input type='radio' name='settings[{$id}]' value='{$k}' {$checked} class='radio {$class}'>{$v['label']}</label></li>";

                Line exceeds 120 characters; contains 157 characters
                Open

                        wp_enqueue_script('metaslider-admin-addslide', METASLIDER_ASSETS_URL . 'metaslider/image/image.js', ['metaslider-admin-script'], METASLIDER_VERSION);

                Line exceeds 120 characters; contains 236 characters
                Open

                            $goPro = "<div style='display: none;' id='screen-options-link-wrap'><a target='_blank' class='show-settings' href='{$link}'>Meta Slider v" . METASLIDER_VERSION . ' - ' . __('Upgrade to Pro $19', 'metaslider') . '</a></div>';

                Line exceeds 120 characters; contains 140 characters
                Open

                        wp_enqueue_script('metaslider-colorbox', METASLIDER_ASSETS_URL . 'colorbox/jquery.colorbox-min.js', ['jquery'], METASLIDER_VERSION);

                Line exceeds 120 characters; contains 143 characters
                Open

                                    $return  .= "<input class='select-slider' id='{$k}' rel='{$k}' type='radio' name='settings[type]' value='{$k}' {$checked} >

                Line exceeds 120 characters; contains 140 characters
                Open

                        if ((isset($_GET['page']) && 'metaslider' === $_GET['page']) || (isset($_GET['tab']) && in_array($_GET['tab'], $metaslider_tabs))) {

                Line exceeds 120 characters; contains 168 characters
                Open

                        wp_enqueue_script('metaslider-admin-script', METASLIDER_ASSETS_URL . 'metaslider/admin.js', ['jquery', 'metaslider-tipsy', 'media-upload'], METASLIDER_VERSION);

                Line exceeds 120 characters; contains 127 characters
                Open

                        wp_enqueue_script('metaslider-tipsy', METASLIDER_ASSETS_URL . 'tipsy/jquery.tipsy.js', ['jquery'], METASLIDER_VERSION);

                Line exceeds 120 characters; contains 127 characters
                Open

                        wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);

                Line exceeds 120 characters; contains 121 characters
                Open

                                $return .= "<tr class='{$row['type']}'><td colspan='2' class='divider'><b>{$row['value']}</b></td></tr>";

                Line exceeds 120 characters; contains 154 characters
                Open

                 * Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.

                Line exceeds 120 characters; contains 122 characters
                Open

                        wp_enqueue_style('metaslider-tipsy-styles', METASLIDER_ASSETS_URL . 'tipsy/tipsy.css', false, METASLIDER_VERSION);

                Line exceeds 120 characters; contains 153 characters
                Open

                        echo "<p style='text-align: center; font-size: 1.2em;'><b>NEW: </b> Animated HTML <b>Layer</b> Slides (with an awesome Drag & Drop editor!)</p>";

                Line exceeds 120 characters; contains 152 characters
                Open

                                                  'content' => "<p><a href='http://www.metaslider.com/documentation/' target='blank'>Meta Slider Documentation</a></p>",

                Line exceeds 120 characters; contains 218 characters
                Open

                        echo "<p style='text-align: center; font-size: 1.2em; margin-top: 50px;'>Get the Pro Addon pack to add support for: <b>Post Feed</b> Slides, <b>YouTube</b> Slides, <b>HTML</b> Slides & <b>Vimeo</b> Slides</p>";

                Line exceeds 120 characters; contains 127 characters
                Open

                        wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);

                Line exceeds 120 characters; contains 131 characters
                Open

                        wp_enqueue_style('metaslider-colorbox-styles', METASLIDER_ASSETS_URL . 'colorbox/colorbox.css', false, METASLIDER_VERSION);

                Line exceeds 120 characters; contains 147 characters
                Open

                                $navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";

                Line exceeds 120 characters; contains 356 characters
                Open

                                $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='number' min='{$row['min']}' max='{$row['max']}' step='{$row['step']}' name='settings[{$id}]' value='{$row['value']}' ><span class='after'>{$row['after']}</span></td></tr>";

                Line exceeds 120 characters; contains 124 characters
                Open

                            $links[] = '<a href="http://www.metaslider.com/upgrade" target="_blank">' . __('Go Pro', 'metaslider') . '</a>';

                Line exceeds 120 characters; contains 125 characters
                Open

                        echo "<p style='text-align: center; font-size: 1.2em;'><b>NEW:</b> Thumbnail Navigation for Flex & Nivo Slider!</p>";

                Line exceeds 120 characters; contains 158 characters
                Open

                                    $navigation_row .= "<li><label><input type='radio' name='settings[{$id}]' value='{$k}' {$checked} {$disabled}>{$v['label']}</label></li>";

                Line exceeds 120 characters; contains 147 characters
                Open

                                $navigation_row = "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><ul>";

                Line exceeds 120 characters; contains 214 characters
                Open

                                                echo "<div class='nav-tab nav-tab-active'><input type='text' name='title'  value='" . $tab['title'] . "' onfocus='this.style.width = ((this.value.length + 1) * 9) + \"px\"' ></div>";

                Line exceeds 120 characters; contains 193 characters
                Open

                                                                   data-slider_width='<?php echo $this->slider->get_setting('width') ?>' data-slider_height='<?php echo $this->slider->get_setting('height') ?>'>

                Line exceeds 120 characters; contains 162 characters
                Open

                                                                            'slideUpDownLeft'    => ['class' => 'option nivo', 'label' => __('Slide Up Down Left', 'metaslider')],

                Line exceeds 120 characters; contains 160 characters
                Open

                                                                            'boxRainReverse'     => ['class' => 'option nivo', 'label' => __('Box Rain Reverse', 'metaslider')],

                Line exceeds 120 characters; contains 143 characters
                Open

                                                                            'bar'     => ['class' => 'option nivo', 'label' => __('Bar (Nivo)', 'metaslider')],

                Line exceeds 120 characters; contains 137 characters
                Open

                                                                        'helptext' => __("Set the text for the 'previous' direction item", 'metaslider'),

                Line exceeds 120 characters; contains 128 characters
                Open

                                                echo "<a href='?page=metaslider&amp;id={$tab['id']}' class='nav-tab'>" . $tab['title'] . '</a>';

                Line exceeds 120 characters; contains 237 characters
                Open

                                                            <input class='alignright button button-primary' type='submit' name='preview' id='ms-preview' value='<?php _e('Save & Preview', 'metaslider') ?>' data-slider_id='<?php echo $this->slider->id ?>'

                Line exceeds 120 characters; contains 138 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('fullWidth') ? 'checked' : '',

                Line exceeds 120 characters; contains 124 characters
                Open

                                                                        'helptext' => __('Randomise the order of the slides', 'metaslider'),

                Line exceeds 120 characters; contains 139 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('hoverPause') ? 'checked' : '',

                Line exceeds 120 characters; contains 135 characters
                Open

                                                                            'horizontal' => ['label' => __('Horizontal', 'metaslider'), 'class' => ''],

                Line exceeds 120 characters; contains 122 characters
                Open

                                                                        'helptext' => __('Opacity of title and navigation', 'metaslider'),

                Line exceeds 120 characters; contains 121 characters
                Open

                                                                            'flex'       => ['label' => __('Flex Slider', 'metaslider')],

                Line exceeds 120 characters; contains 157 characters
                Open

                                                                    <p><?php _e('Copy & paste the shortcode directly into any WordPress post or page.', 'metaslider'); ?></p>

                Line exceeds 120 characters; contains 145 characters
                Open

                                                                            'light'   => ['class' => 'option nivo', 'label' => __('Light (Nivo)', 'metaslider')],

                Line exceeds 120 characters; contains 153 characters
                Open

                                                                            var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';

                Line exceeds 120 characters; contains 137 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('autoPlay') ? 'checked' : '',

                Line exceeds 120 characters; contains 199 characters
                Open

                                                                        'helptext' => __('Smart Crop ensures your responsive slides are cropped to a ratio that results in a consistent slideshow size', 'metaslider'),

                Line exceeds 120 characters; contains 133 characters
                Open

                                                                            'vertical'   => ['label' => __('Vertical', 'metaslider'), 'class' => ''],

                Line exceeds 120 characters; contains 167 characters
                Open

                                                                        'value'    => 'false' === $this->slider->get_setting('cssClass') ? '' : $this->slider->get_setting('cssClass'),

                Line exceeds 120 characters; contains 148 characters
                Open

                                                                            'rain'               => ['class' => 'option coin', 'label' => __('Rain', 'metaslider')],

                Line exceeds 120 characters; contains 135 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('center') ? 'checked' : '',

                Line exceeds 120 characters; contains 141 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('carouselMode') ? 'checked' : '',

                Line exceeds 120 characters; contains 204 characters
                Open

                                                                    <textarea readonly='readonly'>&lt;?php &#13;&#10;    echo do_shortcode("[metaslider id=<?php echo $this->slider->id ?>]"); &#13;&#10;?></textarea></div>

                Line exceeds 120 characters; contains 240 characters
                Open

                                $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='{$id}' value='{$row['value']}' ></td></tr>";

                Line exceeds 120 characters; contains 150 characters
                Open

                                                                        'label'    => __('Number of squares', 'metaslider') . ' (' . __('Height', 'metaslider') . ')',

                Line exceeds 120 characters; contains 137 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('printCss') ? 'checked' : '',

                Line exceeds 120 characters; contains 145 characters
                Open

                                                                        'helptext' => __('Uncheck this is you would like to include your own CSS', 'metaslider'),

                Line exceeds 120 characters; contains 122 characters
                Open

                                                                    <iframe style='border:none; overflow:hidden; width:80px; height:21px;'

                Line exceeds 120 characters; contains 250 characters
                Open

                                $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><input class='option {$row['class']} {$id}' type='text' name='settings[{$id}]' value='{$row['value']}' ></td></tr>";

                Line exceeds 120 characters; contains 152 characters
                Open

                                                                            'boxRain'            => ['class' => 'option nivo', 'label' => __('Box Rain', 'metaslider')],

                Line exceeds 120 characters; contains 134 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('links') ? 'checked' : '',

                Line exceeds 120 characters; contains 257 characters
                Open

                                                    <a class='delete-slider alignright button-secondary confirm' href='<?php echo wp_nonce_url("?page=metaslider&amp;delete={$this->slider->id}", 'metaslider_delete_slider'); ?>'><?php _e('Delete Slider', 'metaslider') ?></a>

                Line exceeds 120 characters; contains 130 characters
                Open

                                        . '/metaslider/matchalabs.png); background-repeat: no-repeat; background-position: left bottom;"></span> '

                Line exceeds 120 characters; contains 157 characters
                Open

                                                                            'sliceUpLeft'        => ['class' => 'option nivo', 'label' => __('Slide Up Left', 'metaslider')],

                Line exceeds 120 characters; contains 157 characters
                Open

                                                                            'sliceUpDown'        => ['class' => 'option nivo', 'label' => __('Slice Up Down', 'metaslider')],

                Line exceeds 120 characters; contains 159 characters
                Open

                                                                        'helptext' => __('Display multiple slides at once. Slideshow output will be 100% wide.', 'metaslider'),

                Line exceeds 120 characters; contains 152 characters
                Open

                                                                        'helptext' => __('Uncheck this is you would like to include your own Javascript', 'metaslider'),

                Line exceeds 120 characters; contains 141 characters
                Open

                                                                        'helptext' => __('Delay adding the flexslider class to the slideshow', 'metaslider'),

                Line exceeds 120 characters; contains 167 characters
                Open

                                            echo "<div id='message' class='updated'><p>" . __("New slideshow created. Click 'Add Slide' to get started!", 'metaslider') . '</p></div>';

                Line exceeds 120 characters; contains 149 characters
                Open

                                                                            'slide'              => ['class' => 'option flex', 'label' => __('Slide', 'metaslider')],

                Line exceeds 120 characters; contains 144 characters
                Open

                                                                            'dark'    => ['class' => 'option nivo', 'label' => __('Dark (Nivo)', 'metaslider')],

                Line exceeds 120 characters; contains 138 characters
                Open

                                                                        'helptext' => __('How long to display each slide, in milliseconds', 'metaslider'),

                Line exceeds 120 characters; contains 133 characters
                Open

                                                                        'helptext' => __("Set the text for the 'next' direction item", 'metaslider'),

                Line exceeds 120 characters; contains 136 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('printJs') ? 'checked' : '',

                Line exceeds 120 characters; contains 139 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('noConflict') ? 'checked' : '',

                Line exceeds 120 characters; contains 122 characters
                Open

                                $return .= apply_filters('metaslider_get_available_themes', $themes, $this->slider->get_setting('theme'));

                Line exceeds 120 characters; contains 135 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('random') ? 'checked' : '',

                Line exceeds 120 characters; contains 293 characters
                Open

                                                                    <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.metaslider.com" data-text="Check out Meta Slider, an easy to use slideshow plugin for WordPress" data-hashtags="metaslider, wordpress, slideshow">Tweet</a>

                Line exceeds 120 characters; contains 161 characters
                Open

                                                            <a href='#' class='button alignright add-slide' data-editor='content' title='<?php _e('Add Slide', 'metaslider') ?>'>

                Line exceeds 120 characters; contains 130 characters
                Open

                                                                        'helptext' => __('Transition between slides automatically', 'metaslider'),

                Line exceeds 120 characters; contains 124 characters
                Open

                                                                <li rel='tab-1' class='selected'><?php _e('Shortcode', 'metaslider') ?></li>

                Line exceeds 120 characters; contains 138 characters
                Open

                                                                    <div class="g-plusone" data-size="medium" data-href="http://www.metaslider.com"></div>

                Line exceeds 120 characters; contains 124 characters
                Open

                                            echo "<option value='?page=metaslider&amp;id={$tab['id']}'{$selected}>{$tab['title']}</option>";

                Line exceeds 120 characters; contains 121 characters
                Open

                                                                            'nivo'       => ['label' => __('Nivo Slider', 'metaslider')],

                Line exceeds 120 characters; contains 121 characters
                Open

                                                                            'coin'       => ['label' => __('Coin Slider', 'metaslider')],

                Line exceeds 120 characters; contains 154 characters
                Open

                                                                            'boxRandom'          => ['class' => 'option nivo', 'label' => __('Box Random', 'metaslider')],

                Line exceeds 120 characters; contains 122 characters
                Open

                                                        <h3 class="hndle"><span><?php _e('Advanced Settings', 'metaslider') ?></span></h3>

                Line exceeds 120 characters; contains 149 characters
                Open

                                                                        'helptext' => __("Stretch the slideshow output to fill it's parent container", 'metaslider'),

                Line exceeds 120 characters; contains 161 characters
                Open

                                                                            'default' => ['class' => 'option nivo flex coin responsive', 'label' => __('Default', 'metaslider')],

                Line exceeds 120 characters; contains 138 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('smartCrop') ? 'checked' : '',

                Line exceeds 120 characters; contains 136 characters
                Open

                                                                        'checked'  => 'true' === $this->slider->get_setting('reverse') ? 'checked' : '',

                Line exceeds 120 characters; contains 135 characters
                Open

                                                                        'helptext' => __('Set the speed of animations, in milliseconds', 'metaslider'),

                Line exceeds 120 characters; contains 125 characters
                Open

                                                                            scrolling="no" frameborder="0" allowTransparency="true"></iframe>

                Line exceeds 120 characters; contains 204 characters
                Open

                                $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";

                Line exceeds 120 characters; contains 173 characters
                Open

                                                            <input class='alignright button button-primary' type='submit' name='save' id='ms-save' value='<?php _e('Save', 'metaslider') ?>'>

                Line exceeds 120 characters; contains 155 characters
                Open

                                                                            'random'             => ['class' => 'option coin nivo', 'label' => __('Random', 'metaslider')],

                Line exceeds 120 characters; contains 158 characters
                Open

                                                                            'slideInRight'       => ['class' => 'option nivo', 'label' => __('Slide In Right', 'metaslider')],

                Line exceeds 120 characters; contains 126 characters
                Open

                                                                            'thumbnails' => ['label' => __('Thumbnails (Pro)', 'metaslider')],

                Line exceeds 120 characters; contains 127 characters
                Open

                                                                $aFields = apply_filters('metaslider_basic_settings', $aFields, $this->slider);

                Line exceeds 120 characters; contains 176 characters
                Open

                                                                    <p><?php _e('Copy & paste this code into a template file to include the slideshow within your theme.', 'metaslider'); ?></p>

                Line exceeds 120 characters; contains 130 characters
                Open

                                                                <span class='wp-media-buttons-icon'></span> <?php _e('Add Slide', 'metaslider') ?>

                Line exceeds 120 characters; contains 154 characters
                Open

                                                                            'sliceDown'          => ['class' => 'option nivo', 'label' => __('Slide Down', 'metaslider')],

                Line exceeds 120 characters; contains 157 characters
                Open

                                                                            'slideInLeft'        => ['class' => 'option nivo', 'label' => __('Slide In Left', 'metaslider')],

                Line exceeds 120 characters; contains 124 characters
                Open

                                                                        'helptext' => __('Show the slide navigation bullets', 'metaslider'),

                Line exceeds 120 characters; contains 149 characters
                Open

                                                                        'label'    => __('Number of squares', 'metaslider') . ' (' . __('Width', 'metaslider') . ')',

                Line exceeds 120 characters; contains 167 characters
                Open

                                                                        'value'    => 'false' === $this->slider->get_setting('prevText') ? '' : $this->slider->get_setting('prevText'),

                Line exceeds 120 characters; contains 127 characters
                Open

                                                                        'helptext' => __('Set the fade in speed of the caption', 'metaslider'),

                Line exceeds 120 characters; contains 204 characters
                Open

                                $return .= "<tr class='{$row['type']}'><td class='tipsy-tooltip' title=\"{$row['helptext']}\">{$row['label']}</td><td><select class='option {$row['class']} {$id}' name='settings[{$id}]'>";

                Line exceeds 120 characters; contains 174 characters
                Open

                                                                        'helptext' => __('Pause the slideshow when hovering over slider, then resume when no longer hovering.', 'metaslider'),

                Line exceeds 120 characters; contains 164 characters
                Open

                            var metaslider_pro_active = <?php echo function_exists('is_plugin_active') && is_plugin_active('ml-slider-pro/ml-slider-pro.php') ? 'true' : 'false' ?>;

                Line exceeds 120 characters; contains 149 characters
                Open

                                                                            'swirl'              => ['class' => 'option coin', 'label' => __('Swirl', 'metaslider')],

                Line exceeds 120 characters; contains 152 characters
                Open

                                                                            'straight'           => ['class' => 'option coin', 'label' => __('Straight', 'metaslider')],

                Line exceeds 120 characters; contains 152 characters
                Open

                                                                            'sliceUp'            => ['class' => 'option nivo', 'label' => __('Slice Up', 'metaslider')],

                Line exceeds 120 characters; contains 148 characters
                Open

                                                                            'fold'               => ['class' => 'option nivo', 'label' => __('Fold', 'metaslider')],

                Line exceeds 120 characters; contains 164 characters
                Open

                                                                            'fade'               => ['class' => 'option nivo flex responsive', 'label' => __('Fade', 'metaslider')],

                Line exceeds 120 characters; contains 165 characters
                Open

                                                                            'boxRainGrowReverse' => ['class' => 'option nivo', 'label' => __('Box Rain Grow Reverse', 'metaslider')],

                Line exceeds 120 characters; contains 122 characters
                Open

                                                                        'helptext' => __('Reverse the animation direction', 'metaslider'),

                Line exceeds 120 characters; contains 167 characters
                Open

                                                                        'value'    => 'false' === $this->slider->get_setting('nextText') ? '' : $this->slider->get_setting('nextText'),

                Line exceeds 120 characters; contains 170 characters
                Open

                                                                        'helptext' => __('Specify any custom CSS Classes you would like to be added to the slider wrapper', 'metaslider'),

                Line exceeds 120 characters; contains 130 characters
                Open

                                                                $aFields = apply_filters('metaslider_advanced_settings', $aFields, $this->slider);

                Line exceeds 120 characters; contains 153 characters
                Open

                                                                    <input readonly='readonly' type='text' value='[metaslider id=<?php echo $this->slider->id ?>]'></div>

                Line exceeds 120 characters; contains 298 characters
                Open

                                                                            src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.metaslider.com&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21&amp;appId=156668027835524"

                The variable $the_query is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $last_modified is not named in camelCase.
                Open

                    private function add_slider()
                    {
                        // check nonce
                        check_admin_referer('metaslider_add_slider');
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function find_slider($orderby, $order)
                    {
                        $args = [
                            'force_no_custom_order' => true,
                            'post_type'             => 'ml-slider',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $metaslider_tabs is not named in camelCase.
                Open

                    public function custom_media_upload_tab_name($tabs)
                    {
                        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
                
                        // restrict our tab changes to the meta slider plugin page
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $slider_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $sort_key is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $slider_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $slider_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $metaslider_tabs is not named in camelCase.
                Open

                    public function custom_media_upload_tab_name($tabs)
                    {
                        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
                
                        // restrict our tab changes to the meta slider plugin page
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $last_modified is not named in camelCase.
                Open

                    private function add_slider()
                    {
                        // check nonce
                        check_admin_referer('metaslider_add_slider');
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function find_slider($orderby, $order)
                    {
                        $args = [
                            'force_no_custom_order' => true,
                            'post_type'             => 'ml-slider',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $slider_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function find_slider($orderby, $order)
                    {
                        $args = [
                            'force_no_custom_order' => true,
                            'post_type'             => 'ml-slider',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    public function set_slider($id, $shortcode_settings = [])
                    {
                        $type = 'flex';
                
                        $settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $shortcode_settings is not named in camelCase.
                Open

                    public function set_slider($id, $shortcode_settings = [])
                    {
                        $type = 'flex';
                
                        $settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $temp_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $last_modified is not named in camelCase.
                Open

                    private function add_slider()
                    {
                        // check nonce
                        check_admin_referer('metaslider_add_slider');
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function find_slider($orderby, $order)
                    {
                        $args = [
                            'force_no_custom_order' => true,
                            'post_type'             => 'ml-slider',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $temp_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $slider_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $temp_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $slider_id is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $add_url is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $add_url is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $the_query is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $add_url is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $max_tabs is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $max_tabs is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $add_url is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $navigation_row is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $max_tabs is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $max_tabs is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The variable $max_tabs is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseVariableName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name variables.

                Example

                class ClassName {
                    public function doSomething() {
                        $data_module = new DataModule();
                    }
                }

                Source

                The method register_slide_types is not named in camelCase.
                Open

                    private function register_slide_types()
                    {
                        $image = new MetaImageSlide();
                    }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method register_admin_menu is not named in camelCase.
                Open

                    public function register_admin_menu()
                    {
                        $title = apply_filters('metaslider_menu_title', 'Meta Slider');
                
                        $page = add_menu_page($title, $title, 'edit_others_posts', 'metaslider', [
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method create_slider is not named in camelCase.
                Open

                    private function create_slider($type, $id, $shortcode_settings)
                    {
                        switch ($type) {
                            case ('coin'):
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method add_slider is not named in camelCase.
                Open

                    private function add_slider()
                    {
                        // check nonce
                        check_admin_referer('metaslider_add_slider');
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method custom_media_upload_tab_name is not named in camelCase.
                Open

                    public function custom_media_upload_tab_name($tabs)
                    {
                        $metaslider_tabs = ['post_feed', 'layer', 'youtube', 'vimeo'];
                
                        // restrict our tab changes to the meta slider plugin page
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method go_pro_cta is not named in camelCase.
                Open

                    public function go_pro_cta()
                    {
                        if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
                            $link = apply_filters('metaslider_hoplink', 'http://www.metaslider.com/upgrade/');
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method find_slider is not named in camelCase.
                Open

                    private function find_slider($orderby, $order)
                    {
                        $args = [
                            'force_no_custom_order' => true,
                            'post_type'             => 'ml-slider',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method system_check is not named in camelCase.
                Open

                    public function system_check()
                    {
                        $systemCheck = new MetaSliderSystemCheck();
                        $systemCheck->check();
                    }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method all_meta_sliders is not named in camelCase.
                Open

                    private function all_meta_sliders($sort_key = 'date')
                    {
                        $sliders = false;
                
                        // list the tabs
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method metaslider_pro_tab is not named in camelCase.
                Open

                    public function metaslider_pro_tab()
                    {
                        if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
                            return wp_iframe([$this, 'iframe']);
                        }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method custom_media_uploader_tabs is not named in camelCase.
                Open

                    public function custom_media_uploader_tabs($strings)
                    {
                        //update strings
                        if (\Xmf\Request::hasVar('page', 'GET') && 'metaslider' == $_GET['page']) {
                            $strings['insertMediaTitle'] = __('Image', 'metaslider');
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method register_taxonomy is not named in camelCase.
                Open

                    public function register_taxonomy()
                    {
                        register_taxonomy('ml-slider', 'attachment', [
                            'hierarchical' => true,
                            'public'       => false,
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method upgrade_to_pro is not named in camelCase.
                Open

                    public function upgrade_to_pro($links)
                    {
                        if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
                            $links[] = '<a href="http://www.metaslider.com/upgrade" target="_blank">' . __('Go Pro', 'metaslider') . '</a>';
                        }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method set_slider is not named in camelCase.
                Open

                    public function set_slider($id, $shortcode_settings = [])
                    {
                        $type = 'flex';
                
                        $settings = array_merge(get_post_meta($id, 'ml-slider_settings', true), $shortcode_settings);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method admin_process is not named in camelCase.
                Open

                    public function admin_process()
                    {
                        // this function should only ever be called from the Meta Slider admin page.
                        if (!is_admin()) {
                            return;
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method register_shortcode is not named in camelCase.
                Open

                    public function register_shortcode($atts)
                    {
                        if (!isset($atts['id'])) {
                            return false;
                        }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method delete_slider is not named in camelCase.
                Open

                    private function delete_slider($id)
                    {
                        // check nonce
                        check_admin_referer('metaslider_delete_slider');
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method register_admin_styles is not named in camelCase.
                Open

                    public function register_admin_styles()
                    {
                        wp_enqueue_style('metaslider-admin-styles', METASLIDER_ASSETS_URL . 'metaslider/admin.css', false, METASLIDER_VERSION);
                        wp_enqueue_style('metaslider-colorbox-styles', METASLIDER_ASSETS_URL . 'colorbox/colorbox.css', false, METASLIDER_VERSION);
                        wp_enqueue_style('metaslider-tipsy-styles', METASLIDER_ASSETS_URL . 'tipsy/tipsy.css', false, METASLIDER_VERSION);
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method help_tab is not named in camelCase.
                Open

                    public function help_tab()
                    {
                        $screen = get_current_screen();
                
                        // documentation tab
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method load_plugin_textdomain is not named in camelCase.
                Open

                    public function load_plugin_textdomain()
                    {
                        load_plugin_textdomain('metaslider', false, \dirname(plugin_basename(__FILE__)) . '/languages/');
                    }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method register_admin_scripts is not named in camelCase.
                Open

                    public function register_admin_scripts()
                    {
                        if (wp_script_is('wp-auth-check', 'queue')) {
                            // meta slider checks for active AJAX requests in order to show the spinner
                            // .. but the auth-check runs an AJAX request every 15 seconds
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method register_post_type is not named in camelCase.
                Open

                    public function register_post_type()
                    {
                        register_post_type('ml-slider', [
                            'query_var' => false,
                            'rewrite'   => false,
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method get_easing_options is not named in camelCase.
                Open

                    private function get_easing_options()
                    {
                        $options = [
                            'linear',
                            'swing',
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method render_admin_page is not named in camelCase.
                Open

                    public function render_admin_page()
                    {
                        $this->admin_process();
                        $this->go_pro_cta();
                        $this->system_check();
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method admin_footer is not named in camelCase.
                Open

                    public function admin_footer()
                    {
                        global $pagenow;
                
                        // Only run in post/page creation and edit screens
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method insert_metaslider_button is not named in camelCase.
                Open

                    public function insert_metaslider_button($context)
                    {
                        global $pagenow;
                
                        if (in_array($pagenow, ['post.php', 'page.php', 'post-new.php', 'post-edit.php'])) {
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method compare_elems is not named in camelCase.
                Open

                    private function compare_elems($elem1, $elem2)
                    {
                        return $elem1['priority'] > $elem2['priority'];
                    }
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                The method build_settings_rows is not named in camelCase.
                Open

                    public function build_settings_rows($aFields)
                    {
                        // order the fields by priority
                        uasort($aFields, [$this, 'compare_elems']);
                
                
                Severity: Minor
                Found in assets/js/ml-slider/ml-slider.php by phpmd

                CamelCaseMethodName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name methods.

                Example

                class ClassName {
                    public function get_name() {
                    }
                }

                Source

                There are no issues that match your filters.

                Category
                Status