felixarntz/global-admin

View on GitHub
wp-global-admin/wp-admin/global/admin.php

Summary

Maintainability
A
0 mins
Test Coverage

The function _ga_detect_abspath() contains an exit expression.
Open

    die( 'WordPress Core directory could not be detected.' );

ExitExpression

Since: 0.2

An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            exit(23);
        }
    }
}

Source https://phpmd.org/rules/design.html#exitexpression

Missing file doc comment
Open

<?php

There must be no blank lines after the function comment
Open

 */

Inline comments must end in full-stops, exclamation marks, or question marks
Open

//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );

There must be no blank line following an inline comment
Open

//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
Open

    wp_die( __( 'Multinetwork support is not enabled.', 'wp-global-admin' ) );

No space found before comment text; expected "// require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );" but found "//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );"
Open

//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
Open

    wp_die( __( 'Multisite support is not enabled.' ) );

There are no issues that match your filters.

Category
Status