soderlind/plugin-customizer

View on GitHub

Showing 122 of 122 total issues

Spaces must be used for mid-line alignment; tabs are not allowed
Open

                'type'            => 'option',
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Equals sign not aligned with surrounding assignments; expected 7 spaces but found 1 space
Open

                $ver = false;
Severity: Minor
Found in src/Blank_Slate.php by phpcodesniffer

Spaces must be used for mid-line alignment; tabs are not allowed
Open

         * @return  Array                The updated array with query variables.
Severity: Minor
Found in src/Plugin_Customizer.php by phpcodesniffer

Space found before comma in function call
Open

            $url = add_query_arg( $this->slug , 'on', $url );
Severity: Minor
Found in src/Plugin_Customizer.php by phpcodesniffer

Found precision alignment of 2 spaces.
Open

      align-items: center;
Severity: Minor
Found in templates/content.php by phpcodesniffer

Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space
Open

        $version = PLUGIN_CUSTOMIZER_DEMO_VERSION;
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Spaces must be used for mid-line alignment; tabs are not allowed
Open

                'description'    => __( 'Customize newsletter content', 'plugin-customizer' ),
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 2 space(s) between "'transport'" and double arrow, but found 5.
Open

                'transport'     => 'postMessage',
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 4 space(s) between "'default'" and double arrow, but found 7.
Open

                'default'        => 'This was to be an eventful day for the travelers.  They had hardly been walking an hour when they saw before them a great ditch that crossed the road and divided the forest as far as they could see on either side.  It was a very wide ditch, and when they crept up to the edge and looked into it they could see it was also very deep, and there were many big, jagged rocks at the bottom.  The sides were so steep that none of them could climb down, and for a moment it seemed that their journey must end. "What shall we do?" asked Dorothy despairingly. "I haven\'t the faintest idea," said the Tin Woodman, and the Lion shook his shaggy mane and looked thoughtful.', //esc_html( '<p> Nulla laoreet erat vitae aliquet tristique. Quisque quis suscipit enim, a elementum eros. Vestibulum quis lacus ligula. Mauris sit amet nibh tincidunt, gravida tortor ac, maximus nisi. Nunc turpis mauris, blandit vitae nibh non, blandit pharetra purus. Sed sed convallis diam. In ante nisi, pellentesque in laoreet at, fringilla ac neque. </p> <p> Cras consequat eros lectus, ac dignissim justo cursus ac. In mi tortor, ornare eu quam a, ultrices tincidunt magna. Fusce non purus quis ex convallis vehicula. Aenean purus diam, vulputate vel pellentesque ultrices, tincidunt ac lectus. Nullam est purus, lobortis ac aliquam eget, egestas a diam. Praesent eget sapien vitae orci faucibus tempus. Ut sit amet lorem elit. Curabitur et vestibulum nibh. </p> <p> Mauris vestibulum eget nisl sit amet gravida. Nullam in orci ut sem maximus dapibus blandit quis dolor. Sed pretium efficitur elit, eget vulputate sapien bibendum non. Proin congue posuere sagittis. Ut fermentum mauris ut gravida faucibus. Aenean a malesuada magna. Vestibulum nec viverra metus. Nunc aliquam eros orci, ut malesuada felis malesuada vitae. Phasellus vehicula non ex at scelerisque. </p>' ),
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Found precision alignment of 2 spaces.
Open

      background-color: #333333;
Severity: Minor
Found in templates/content.php by phpcodesniffer

Spaces must be used for mid-line alignment; tabs are not allowed
Open

                'description'    => __( 'Customize Your Logo Section', 'plugin-customizer' ),
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 4 space(s) between "'priority'" and double arrow, but found 6.
Open

                'priority'        => 10,
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 2 space(s) between "'capability'" and double arrow, but found 4.
Open

                'capability'    => 'manage_options',
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 7 space(s) between "'type'" and double arrow, but found 10.
Open

                'type'            => 'option',
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 7 space(s) between "'type'" and double arrow, but found 10.
Open

                'type'            => 'option',
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Equals sign not aligned with surrounding assignments; expected 10 spaces but found 1 space
Open

        $url = $pagenow;
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Array double arrow not aligned correctly; expected 1 space(s) between "'description'" and double arrow, but found 3.
Open

                'description'    => __( 'Customize Your Logo Section', 'plugin-customizer' ),
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Spaces must be used for mid-line alignment; tabs are not allowed
Open

         * @param   Object    $wp_rewrite Permalink structure
Severity: Minor
Found in src/Plugin_Customizer.php by phpcodesniffer

Spaces must be used for mid-line alignment; tabs are not allowed
Open

                'default'        => 'This was to be an eventful day for the travelers.  They had hardly been walking an hour when they saw before them a great ditch that crossed the road and divided the forest as far as they could see on either side.  It was a very wide ditch, and when they crept up to the edge and looked into it they could see it was also very deep, and there were many big, jagged rocks at the bottom.  The sides were so steep that none of them could climb down, and for a moment it seemed that their journey must end. "What shall we do?" asked Dorothy despairingly. "I haven\'t the faintest idea," said the Tin Woodman, and the Lion shook his shaggy mane and looked thoughtful.', //esc_html( '<p> Nulla laoreet erat vitae aliquet tristique. Quisque quis suscipit enim, a elementum eros. Vestibulum quis lacus ligula. Mauris sit amet nibh tincidunt, gravida tortor ac, maximus nisi. Nunc turpis mauris, blandit vitae nibh non, blandit pharetra purus. Sed sed convallis diam. In ante nisi, pellentesque in laoreet at, fringilla ac neque. </p> <p> Cras consequat eros lectus, ac dignissim justo cursus ac. In mi tortor, ornare eu quam a, ultrices tincidunt magna. Fusce non purus quis ex convallis vehicula. Aenean purus diam, vulputate vel pellentesque ultrices, tincidunt ac lectus. Nullam est purus, lobortis ac aliquam eget, egestas a diam. Praesent eget sapien vitae orci faucibus tempus. Ut sit amet lorem elit. Curabitur et vestibulum nibh. </p> <p> Mauris vestibulum eget nisl sit amet gravida. Nullam in orci ut sem maximus dapibus blandit quis dolor. Sed pretium efficitur elit, eget vulputate sapien bibendum non. Proin congue posuere sagittis. Ut fermentum mauris ut gravida faucibus. Aenean a malesuada magna. Vestibulum nec viverra metus. Nunc aliquam eros orci, ut malesuada felis malesuada vitae. Phasellus vehicula non ex at scelerisque. </p>' ),
Severity: Minor
Found in plugin-customizer-demo.php by phpcodesniffer

Function loadMappedFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        protected function loadMappedFile( $prefix, $relative_class ) {
            // are there any base directories for this namespace prefix?
            if ( isset( $this->prefixes[ $prefix ] ) === false ) {
                return false;
            }
Severity: Minor
Found in inc/ps-auto-loader.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

Severity
Category
Status
Source
Language