awsmug/torro-forms-plugin-boilerplate

View on GitHub

Showing 34 of 34 total issues

Avoid unused parameters such as '$submission'.
Open

    protected function process_response( $response, $connection, $route_slug, $submission, $form ) {
Severity: Minor
Found in src/actions/frontend-posting.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$submission'.
Open

    public function validate_field( $value, $element, $submission ) {
Severity: Minor
Found in src/element-types/autocomplete.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Avoid unused parameters such as '$form'.
Open

    protected function process_response( $response, $connection, $route_slug, $submission, $form ) {
Severity: Minor
Found in src/actions/frontend-posting.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

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

    public function validate_field( $value, $element, $submission ) {
        $settings = $this->get_settings( $element );

        // Support Y-m-d string passed, just so that submission editing with single field works too.
        if ( is_string( $value ) && 2 === substr_count( $value, '-' ) ) {
Severity: Minor
Found in src/element-types/date.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 filter_json() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
Open

    public function filter_json( $data, $element, $submission = null ) {
        $data = parent::filter_json( $data, $element, $submission );

        $settings = $this->get_settings( $element );

Severity: Minor
Found in src/element-types/autocomplete.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

Adjoining classes: .ui-autocomplete.ui-menu
Open

.ui-autocomplete.ui-menu {

Adjoining classes: .ui-autocomplete.ui-menu > .ui-menu-item
Open

.ui-autocomplete.ui-menu{max-width:32em;padding-left:0;list-style:none;background-color:#fff;border:1px solid #ccc}.ui-autocomplete.ui-menu>.ui-menu-item{padding:2px 5px}

Rule doesn't have all its properties in alphabetical order.
Open

.ui-autocomplete.ui-menu {

Rule doesn't have all its properties in alphabetical order.
Open

.ui-autocomplete.ui-menu{max-width:32em;padding-left:0;list-style:none;background-color:#fff;border:1px solid #ccc}.ui-autocomplete.ui-menu>.ui-menu-item{padding:2px 5px}

Adjoining classes: .ui-autocomplete.ui-menu > .ui-menu-item
Open

.ui-autocomplete.ui-menu > .ui-menu-item {

Adjoining classes: .ui-autocomplete.ui-menu
Open

.ui-autocomplete.ui-menu{max-width:32em;padding-left:0;list-style:none;background-color:#fff;border:1px solid #ccc}.ui-autocomplete.ui-menu>.ui-menu-item{padding:2px 5px}

TODO found
Open

**TODO:** Detailed plugin description goes here.
Severity: Minor
Found in readme.txt by fixme

TODO found
Open

**TODO:** FAQ goes here.
Severity: Minor
Found in readme.txt by fixme

TODO found
Open

**TODO:** Screenshots go here as a list.
Severity: Minor
Found in readme.txt by fixme
Severity
Category
Status
Source
Language