90% better-wp-login-page

Code Review | Better WP Login Page

WordPress plugin Better WP Login Page scored90%from 54 tests.

About plugin

  • Plugin page: better-wp-login-page
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 25, 2020
  • Latest release: Mar 18, 2023
  • Number of updates: 13
  • Update frequency: every 79.2 days
  • Top authors: cortesfrau (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.79ms] Passed 4 tests

Analyzing server-side resources used by Better WP Login Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.69 ▼3.55
Dashboard /wp-admin3.32 ▲0.0244.11 ▼0.51
Posts /wp-admin/edit.php3.37 ▲0.0242.89 ▼4.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.60 ▼6.16
Media Library /wp-admin/upload.php3.25 ▲0.0237.05 ▲0.24
Login Page /wp-admin/options-general.php?page=better-wp-login-page3.2539.08

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better WP Login Page
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7614.82 ▲0.431.80 ▲0.1545.99 ▲2.61
Dashboard /wp-admin2,213 ▲214.83 ▼0.07101.43 ▼11.2341.54 ▼0.93
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0736.34 ▼4.2034.04 ▼0.97
Add New Post /wp-admin/post-new.php1,545 ▲1118.52 ▼4.77611.20 ▼65.0956.49 ▲0.88
Media Library /wp-admin/upload.php1,392 ▲14.32 ▲0.1093.09 ▼7.8940.81 ▼3.88
Login Page /wp-admin/options-general.php?page=better-wp-login-page2,0535.13111.4669.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: wp-admin, login, wp-loginphp, login form, login page

better-wp-login-page/better-wp-login-page.php 92% from 13 tests

The main file in "Better WP Login Page" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin751 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript578241386
PHP398104365
Sass1010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/img/no-image.png4.81KB4.87KB0.00%
src/img/no-image.png4.81KB4.87KB0.00%