felixarntz/wp-site-identity

View on GitHub
src/class-wp-site-identity-bootstrap.php

Summary

Maintainability
A
1 hr
Test Coverage

Method get_owner_data_sections has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function get_owner_data_sections() {
        $sections = array(
            'basic'   => array(
                'slug'   => 'basic',
                'title'  => __( 'Basic Information', 'wp-site-identity' ),
Severity: Minor
Found in src/class-wp-site-identity-bootstrap.php - About 1 hr to fix

    Missing class import via use statement (line '74', column '40').
    Open

            $this->bootstrap_settings      = new WP_Site_Identity_Bootstrap_Settings( $this, $this->plugin );

    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 '76', column '40').
    Open

            $this->bootstrap_widgets       = new WP_Site_Identity_Bootstrap_Widgets( $this, $this->plugin );

    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 '78', column '40').
    Open

            $this->bootstrap_customizer    = new WP_Site_Identity_Bootstrap_Customizer( $this, $this->plugin );

    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 '75', column '40').
    Open

            $this->bootstrap_shortcodes    = new WP_Site_Identity_Bootstrap_Shortcodes( $this, $this->plugin );

    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 '77', column '40').
    Open

            $this->bootstrap_admin_pages   = new WP_Site_Identity_Bootstrap_Admin_Pages( $this, $this->plugin );

    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 excessively long variable names like $bootstrap_admin_pages. Keep variable name length under 20.
    Open

        private $bootstrap_admin_pages;

    LongVariable

    Since: 0.2

    Detects when a field, formal or local variable is declared with a long name.

    Example

    class Something {
        protected $reallyLongIntName = -3; // VIOLATION - Field
        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
            $otherReallyLongName = -5; // VIOLATION - Local
            for ($interestingIntIndex = 0; // VIOLATION - For
                 $interestingIntIndex < 10;
                 $interestingIntIndex++ ) {
            }
        }
    }

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

    There are no issues that match your filters.

    Category
    Status