87% wp-ajax-login-and-register

Code Review | WP AJAX Login and Register

WordPress plugin WP AJAX Login and Register scored 87% from 54 tests.

About plugin

  • Plugin page: wp-ajax-login-and...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 5.8.1
  • First release: Mar 25, 2016
  • Latest release: Apr 25, 2016
  • Number of updates: 12
  • Update frequency: every 3.0 days
  • Top authors: newbiesup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 7,813 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by WP AJAX Login and Register
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1438.15 ▲14.66
Dashboard /wp-admin3.07 ▲0.0248.81 ▼0.62
Posts /wp-admin/edit.php3.16 ▲0.0571.60 ▲22.99
Add New Post /wp-admin/post-new.php5.43 ▼0.00107.71 ▼555.20
Media Library /wp-admin/upload.php3.02 ▲0.0231.15 ▼2.04

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP AJAX Login and Register
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,861 ▲28916.49 ▲1.1418.91 ▲9.2349.04 ▼0.25
Dashboard /wp-admin2,971 ▲405.94 ▲0.01150.70 ▼9.95127.31 ▼4.90
Posts /wp-admin/edit.php2,743 ▲42.71 ▼0.0077.25 ▲7.74109.31 ▲14.79
Add New Post /wp-admin/post-new.php1,680 ▼318.78 ▲0.08379.11 ▼0.63113.19 ▲1.90
Media Library /wp-admin/upload.php1,808 ▲15.00 ▼0.04160.37 ▲6.33125.76 ▲5.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-ajax-login-and-register/admin/partials/wp-ajax-login-admin-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ajax-login-and-register/public/partials/wp-ajax-login-public-display.php:134

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Frontend appearance.) image not found
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-ajax-login-and-register === )
Please take inspiration from this readme.txt

wp-ajax-login-and-register/wp-ajax-login.php 85% from 13 tests

This is the main PHP file of "WP AJAX Login and Register" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-ajax-login-and-register.php" instead of "wp-ajax-login.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin750 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12197595395
CSS205164
PO File1364397
JavaScript3565194

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.57
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png62.96KB23.71KB▼ 62.34%