10% gna-custom-admin-login

Code Review | GNA Custom Admin Login Page

WordPress plugin GNA Custom Admin Login Page scored10%from 54 tests.

About plugin

  • Plugin page: gna-custom-admin-...
  • Plugin version: 0.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7
  • WordPress version: 6.3.1
  • First release: Dec 8, 2016
  • Latest release: Dec 14, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: chris_dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /755 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_Custom_AdminLogin::activate_handler() should not be called statically

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.80ms] Passed 4 tests

An overview of server-side resources used by GNA Custom Admin Login Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.79 ▼1.85
Dashboard /wp-admin3.37 ▲0.0247.57 ▼8.38
Posts /wp-admin/edit.php3.48 ▲0.1248.06 ▲0.28
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.73 ▼1.23
Media Library /wp-admin/upload.php3.29 ▲0.0636.64 ▲3.12

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

GNA Custom Admin Login Page: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.19 ▼1.121.75 ▼0.0242.65 ▲0.15
Dashboard /wp-admin2,224 ▲365.86 ▲0.9294.63 ▼12.9382.52 ▲45.03
Posts /wp-admin/edit.php2,107 ▲152.13 ▲0.1334.68 ▼7.0629.33 ▼6.10
Add New Post /wp-admin/post-new.php1,529 ▲1523.26 ▲5.65734.32 ▲57.2349.88 ▼4.00
Media Library /wp-admin/upload.php1,397 ▲94.16 ▼0.0697.60 ▼3.6874.17 ▲29.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GNA_Custom_AdminLogin::deactivate_handler() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GNA_Custom_AdminLogin_Admin_Menu' not found in wp-content/plugins/gna-custom-admin-login/admin/gna-custom-admin-login-admin-settings-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gna-custom-admin-login/inc/gna-custom-admin-login-config.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("none")
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

gna-custom-admin-login/gna-custom-admin-login.php 92% from 13 tests

"GNA Custom Admin Login Page" version 0.9.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 197 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected579 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP67235461
JavaScript114165
CSS15053

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods50
▷ Static methods48.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/gna_20x20.png2.98KB0.33KB▼ 88.89%