84% bm-custom-login

Code Review | Custom Login

WordPress plugin Custom Login scored84%from 54 tests.

About plugin

  • Plugin page: bm-custom-login
  • Plugin version: 2.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.0
  • WordPress version: 6.3.1
  • First release: Jan 7, 2008
  • Latest release: Mar 5, 2023
  • Number of updates: 64
  • Update frequency: every 86.5 days
  • Top authors: BinaryMoon (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

20,000+ active /487,375 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.56ms] Passed 4 tests

A check of server-side resources used by Custom Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.33 ▼5.35
Dashboard /wp-admin3.43 ▲0.1250.20 ▼1.14
Posts /wp-admin/edit.php3.54 ▲0.1852.18 ▲2.59
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.65 ▼14.35
Media Library /wp-admin/upload.php3.35 ▲0.1238.24 ▲5.85
Custom Login /wp-admin/options-general.php?page=custom_login_admin3.3538.93

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Login
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,785 ▲2414.30 ▼0.281.99 ▲0.1140.69 ▼4.02
Dashboard /wp-admin2,196 ▲195.57 ▼0.1184.64 ▼7.5439.37 ▼1.07
Posts /wp-admin/edit.php2,104 ▲42.17 ▲0.1740.92 ▲4.7236.52 ▲2.99
Add New Post /wp-admin/post-new.php1,535 ▲423.35 ▲0.27691.48 ▲33.0452.60 ▼5.19
Media Library /wp-admin/upload.php1,401 ▼24.20 ▼0.04105.96 ▲1.5946.94 ▲1.24
Custom Login /wp-admin/options-general.php?page=custom_login_admin1,6223.8669.5530.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/bm-custom-login/csstidy/data-wp.inc.php on line 16
    • > PHP Notice
      Undefined index: unit_values in wp-content/plugins/bm-custom-login/csstidy/data-wp.inc.php on line 16
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/bm-custom-login/csstidy/data-wp.inc.php on line 24
    • > PHP Notice
      Undefined index: color_values in wp-content/plugins/bm-custom-login/csstidy/data-wp.inc.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/bm-custom-login/bm-custom-login.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: customization, login, customisation, customise, customize...

bm-custom-login/bm-custom-login.php Passed 13 tests

The main PHP file in "Custom Login" ver. 2.3.2 adds more information about the plugin and also serves as the entry point for this plugin
73 characters long description:
Display custom images on the WordPress login screen. Useful for branding.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,364 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP84811,1683,067
CSS9700297

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 148)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity143.00
▷ Minimum class complexity47.00
▷ Maximum class complexity248.00
Average method complexity7.93
▷ Minimum method complexity1.00
▷ Maximum method complexity148.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods82
▷ Static methods1113.41%
▷ Public methods82100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
No PNG files were detected