72% woo-ajax-loginregister

Code Review | Ajax Login/Register for WooCommerce

WordPress plugin Ajax Login/Register for WooCommerce scored 72% from 54 tests.

About plugin

  • Plugin page: woo-ajax-loginreg...
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 5.9.2
  • First release: Oct 1, 2018
  • Latest release: Oct 8, 2021
  • Number of updates: 64
  • Update frequency: every 17.3 days
  • Top authors: zorem (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active / 11,516 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
Installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼308.05ms] Passed 4 tests

Analyzing server-side resources used by Ajax Login/Register for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.2577.75 ▲23.62
Dashboard /wp-admin3.58 ▲0.1837.05 ▼0.38
Posts /wp-admin/edit.php3.81 ▲0.1743.96 ▲0.94
Add New Post /wp-admin/post-new.php7.04 ▲0.08102.50 ▼1,201.23
Media Library /wp-admin/upload.php3.46 ▲0.1725.96 ▼31.54
Ajax Login/Register /wp-admin/admin.php?page=ajax_login_register3.3626.93

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

An overview of browser requirements for Ajax Login/Register for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,886 ▲13216.34 ▲0.7610.91 ▲5.2619.96 ▲17.26
Dashboard /wp-admin2,895 ▲416.26 ▲0.11116.31 ▼19.61221.80 ▼17.22
Posts /wp-admin/edit.php2,688 ▼33.37 ▲0.1266.01 ▼7.42140.59 ▼21.45
Add New Post /wp-admin/post-new.php1,661 ▼016.12 ▼0.21426.44 ▼29.06213.41 ▲50.10
Media Library /wp-admin/upload.php1,698 ▲75.53 ▼0.00141.57 ▼9.76247.46 ▲60.77
Ajax Login/Register /wp-admin/admin.php?page=ajax_login_register550.940.0747.02

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=ajax_login_register
    • > Error in wp-content/plugins/woo-ajax-loginregister/woocommerce-ajax-login-register.php+121
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/woo-ajax-loginregister/woocommerce-ajax-login-register.php:121
    Stack trace:
    #0 wp-includes/class-wp-hook.php(307): Zorem_AJAX_Login_Register->wc_alr_enqueue()
    #1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(474): WP_Hook->do_action()
    #3 wp-admin/admin-header.php(118): do_action()
    #4 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #5 {main}
    thrown

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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-ajax-loginregister/includes/views/alr_setting_tab.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=ajax_login_register
    • > Network (severe)
    wp-admin/admin.php?page=ajax_login_register - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: The official readme.txt might help

woo-ajax-loginregister/woocommerce-ajax-login-register.php 85% from 13 tests

The main file in "Ajax Login/Register for WooCommerce" v. 2.0.4 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: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-ajax-loginregister.php" instead of "woocommerce-ajax-login-register.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin7,149 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS48525,5205,612
PHP5144144823
JavaScript35322518
PO File35683196

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity55.00
▷ Minimum class complexity38.00
▷ Maximum class complexity72.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 0.21MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/backgrounds/stitched-wool.png15.58KB0.70KB▼ 95.51%
assets/images/alr-logo.png19.93KB2.83KB▼ 85.79%
assets/images/backgrounds/45-degree-fabric.png24.26KB5.58KB▼ 77.02%
assets/images/input_checkbox_rtl.png1.21KB0.31KB▼ 74.47%
assets/images/smswoo-icon.png23.49KB3.63KB▼ 84.57%