84% els-ajax-login

Code Review | Ajax Login

WordPress plugin Ajax Login scored84%from 54 tests.

About plugin

  • Plugin page: els-ajax-login
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Oct 22, 2015
  • Number of updates: 11
  • Update frequency: every 0.2 days
  • Top authors: sagor.touch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.27ms] Passed 4 tests

This is a short check of server-side resources used by Ajax Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.68 ▼0.63
Dashboard /wp-admin3.35 ▲0.0449.64 ▼1.74
Posts /wp-admin/edit.php3.40 ▲0.0451.72 ▼1.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.23 ▼5.69
Media Library /wp-admin/upload.php3.27 ▲0.0435.01 ▼0.66

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_els_a_login
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Ajax Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲14514.54 ▼0.085.73 ▲3.6038.24 ▼7.05
Dashboard /wp-admin2,208 ▲315.51 ▼0.1599.06 ▲6.3042.44 ▲0.12
Posts /wp-admin/edit.php2,113 ▲131.99 ▼0.0440.55 ▲3.3635.13 ▲2.90
Add New Post /wp-admin/post-new.php1,541 ▲623.28 ▲4.74681.42 ▲13.4353.22 ▼11.05
Media Library /wp-admin/upload.php1,419 ▲254.18 ▲0.08101.27 ▼5.7446.64 ▲3.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_els_a_login
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/els-ajax-login/els-ajax-login.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/els-ajax-login/els_widget_ajax_login.php:5

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Enable ajax login in wp-login.php page.) image not found
You can look at the official readme.txt

els-ajax-login/els-ajax-login.php 92% from 13 tests

The primary PHP file in "Ajax Login" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • 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 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected401 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23847184
JavaScript1147130
CSS15287

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png13.62KB5.74KB▼ 57.88%