wp-global-admin/wp-admin/global/admin.php
The function _ga_detect_abspath() contains an exit expression. Open
Open
die( 'WordPress Core directory could not be detected.' );
- Read upRead up
- Exclude checks
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
Open
<?php
- Exclude checks
There must be no blank lines after the function comment Open
Open
*/
- Exclude checks
Inline comments must end in full-stops, exclamation marks, or question marks Open
Open
//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
- Exclude checks
There must be no blank line following an inline comment Open
Open
//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
- Exclude checks
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'. Open
Open
wp_die( __( 'Multinetwork support is not enabled.', 'wp-global-admin' ) );
- Exclude checks
No space found before comment text; expected "// require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );" but found "//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );" Open
Open
//require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
- Exclude checks
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'. Open
Open
wp_die( __( 'Multisite support is not enabled.' ) );
- Exclude checks