72% loginpress

Code Review | LoginPress | wp-login Custom Login Page Customizer

WordPress plugin LoginPress | wp-login Custom Login Page Customizer scored72%from 54 tests.

About plugin

  • Plugin page: loginpress
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 8, 2016
  • Latest release: Sep 11, 2023
  • Number of updates: 173
  • Update frequency: every 14.8 days
  • Top authors: hiddenpearls (95.95%)WPBrigade (4.62%)

Code review

54 tests

User reviews

887 reviews

Install metrics

200,000+ active /3,886,600 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼8.00ms] 75% from 4 tests

Analyzing server-side resources used by LoginPress | wp-login Custom Login Page Customizer
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 850.51ms on /wp-admin/admin.php?page=loginpress-addons)
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1740.21 ▲3.76
Dashboard /wp-admin3.50 ▲0.1647.20 ▼20.24
Posts /wp-admin/edit.php3.56 ▲0.2050.37 ▲0.59
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.07 ▼16.10
Media Library /wp-admin/upload.php3.36 ▲0.1338.97 ▲5.09
Customizer /wp-admin/admin.php?page=loginpress3.1926.97
Activate /wp-admin/admin.php?page=loginpress-optin3.3335.22
LoginPress /wp-admin/themes.php?page=abw3.1927.44
Help /wp-admin/admin.php?page=loginpress-help3.4832.01
Settings /wp-admin/admin.php?page=loginpress-settings3.1926.19
Import / Export /wp-admin/admin.php?page=loginpress-import-export3.3734.62
Add-Ons /wp-admin/admin.php?page=loginpress-addons3.54850.51

Server storage [IO: ▲4.00MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 136 new files
Database: no new tables, 9 new options
New WordPress options
loginpress_premium
db_upgraded
widget_recent-posts
loginpress_setting
loginpress_customization
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by LoginPress | wp-login Custom Login Page Customizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11314.25 ▲0.041.62 ▲0.1349.82 ▲7.62
Dashboard /wp-admin2,236 ▲565.52 ▼0.0784.22 ▼2.3136.49 ▼2.85
Posts /wp-admin/edit.php2,148 ▲482.03 ▲0.0539.68 ▼2.6036.15 ▼0.69
Add New Post /wp-admin/post-new.php1,562 ▲2723.07 ▲4.72661.96 ▲42.3749.41 ▼20.23
Media Library /wp-admin/upload.php1,447 ▲504.24 ▼0.0092.62 ▼10.6542.02 ▼2.55
Customizer /wp-admin/admin.php?page=loginpress8801.9822.8542.63
Activate /wp-admin/admin.php?page=loginpress-optin8832.0122.4335.19
LoginPress /wp-admin/themes.php?page=abw8832.0124.5536.31
Help /wp-admin/admin.php?page=loginpress-help8572.0122.9825.92
Settings /wp-admin/admin.php?page=loginpress-settings8802.1623.5935.24
Import / Export /wp-admin/admin.php?page=loginpress-import-export9082.0026.3427.92
Add-Ons /wp-admin/admin.php?page=loginpress-addons1,5472.2023.2237.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • loginpress_premium
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • loginpress_setting
    • loginpress_customization

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/loginpress/include/loginpress-optin-form.php
    • > /wp-content/plugins/loginpress/include/login-footer.php
  • 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/loginpress/classes/class-loginpress-promo.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/loginpress/include/customizer-strings.php:9
    • > PHP Warning
      Use of undefined constant LOGINPRESS_ROOT_PATH - assumed 'LOGINPRESS_ROOT_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/loginpress/classes/class-loginpress-promo.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/loginpress/classes/control-promo.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/loginpress/classes/class-loginpress-promotion.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/loginpress/css/style-login.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/loginpress/include/loginpress-optin-form.php:258
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/loginpress/include/compatibility.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/loginpress/include/loginpress-optout-form.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/loginpress/classes/controls/radio-button.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=loginpress-addons
    • > Network (severe)
    wp-content/plugins/loginpress-pro/img/loginpress-logo2.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: custom login, login, wp-login, login customizer, wordpress login

loginpress/loginpress.php 92% from 13 tests

"LoginPress | wp-login Custom Login Page Customizer" version 1.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 245 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected18,950 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,8533,1048,345
PO File92,9603,3477,560
JavaScript63343581,770
CSS638251,168
SVG604107

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.85
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes27.69%
Methods246
▷ Static methods135.28%
▷ Public methods22089.43%
▷ Protected methods145.69%
▷ Private methods124.88%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
31 compressed PNG files occupy 0.38MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/thumbnail/default-11.png24.67KB25.44KB0.00%
img/thumbnail/gallery-img-1.png1.06KB1.12KB0.00%
img/thumbnail/default-14.png20.91KB21.74KB0.00%
img/back_arrow.png0.17KB0.17KB0.00%
img/black-friday.png7.68KB4.07KB▼ 46.93%