10% login-with-ajax

Code Review | Login With Ajax

WordPress plugin Login With Ajax scored10%from 54 tests.

About plugin

  • Plugin page: login-with-ajax
  • Plugin version: 4.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 3, 2009
  • Latest release: Aug 9, 2023
  • Number of updates: 138
  • Update frequency: every 37.1 days
  • Top authors: netweblogic (98.55%)msykes (2.17%)

Code review

54 tests

User reviews

153 reviews

Install metrics

30,000+ active /1,023,826 total downloads

Benchmarks

Plugin footprint 58% 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
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/login-with-ajax/lwa-install.php+39
    Undefined index: notification_subject

Server metrics [RAM: ▲0.47MB] [CPU: ▼4.31ms] Passed 4 tests

An overview of server-side resources used by Login With Ajax
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3545.49 ▲3.79
Dashboard /wp-admin3.86 ▲0.5654.93 ▼0.28
Posts /wp-admin/edit.php3.91 ▲0.5649.22 ▼5.76
Add New Post /wp-admin/post-new.php6.38 ▲0.4985.59 ▼13.78
Media Library /wp-admin/upload.php3.72 ▲0.4937.48 ▲2.58
Login With Ajax /wp-admin/options-general.php?page=login-with-ajax3.8036.89

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 66 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
lwa_version
widget_recent-posts
widget_recent-comments
db_upgraded
lwa_data
widget_theysaidso_widget
widget_loginwithajaxwidget

Browser metrics Passed 4 tests

Checking browser requirements for Login With Ajax
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21213.64 ▼0.719.23 ▲7.6443.45 ▼1.24
Dashboard /wp-admin2,230 ▲565.70 ▲0.1089.58 ▼1.8442.66 ▲1.97
Posts /wp-admin/edit.php2,133 ▲362.14 ▲0.1438.28 ▲1.7933.70 ▲3.35
Add New Post /wp-admin/post-new.php6,396 ▲4,87027.75 ▲4.24872.76 ▲182.5140.06 ▼16.03
Media Library /wp-admin/upload.php1,432 ▲354.29 ▼0.1298.76 ▲2.1544.07 ▼5.03
Login With Ajax /wp-admin/options-general.php?page=login-with-ajax2,2042.4153.1387.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • lwa_version
    • lwa_data
    • widget_loginwithajaxwidget
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/login-with-ajax/templates/classic/login.php
    • > /wp-content/plugins/login-with-ajax/templates/classic-vanilla/login.php
    • > /wp-content/plugins/login-with-ajax/admin/settings/go-pro.php
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/login-with-ajax/login-with-ajax-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/login-with-ajax/admin/settings/security.php:4
    • > PHP Warning
      Use of undefined constant LOGIN_WITH_AJAX_PATH - assumed 'LOGIN_WITH_AJAX_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/login-with-ajax/templates/classic/login.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Login_With_AJAX\\add_action() in wp-content/plugins/login-with-ajax/admin/notices/admin-notices.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/login-with-ajax/widget/modal/widget_out.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Login_With_AJAX\\add_action() in wp-content/plugins/login-with-ajax/admin/notices/notices.php:266
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/login-with-ajax/templates/legacy-default/widget_in.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/login-with-ajax/templates/default/logged-in.php:10
    • > PHP Notice
      Undefined variable: lwa in wp-content/plugins/login-with-ajax/templates/modal/login.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'LoginWithAjax' not found in wp-content/plugins/login-with-ajax/templates/legacy-modal/widget_out.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

login-with-ajax/login-with-ajax.php Passed 13 tests

The primary PHP file in "Login With Ajax" version 4.1 is used by WordPress to initiate all plugin functionality
115 characters long description:
Ajax driven login widget. Customisable from within your template folder, and advanced settings from the admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin6,952 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP332818143,582
CSS101226971,760
Sass313814802
JavaScript942121693
SVG10072
JSON20043

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity51.22
▷ Minimum class complexity4.00
▷ Maximum class complexity148.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods139
▷ Static methods7755.40%
▷ Public methods13496.40%
▷ Protected methods00.00%
▷ Private methods53.60%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected