84% zm-ajax-login-register

Code Review | ZM Ajax Login & Register

WordPress plugin ZM Ajax Login & Register scored 84% from 54 tests.

About plugin

  • Plugin page: zm-ajax-login-reg...
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 5.9.2
  • First release: Apr 30, 2013
  • Latest release: Oct 27, 2015
  • Number of updates: 40
  • Update frequency: every 22.8 days
  • Top authors: ZaneMatthew (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

9,000+ active / 211,855 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼296.52ms] Passed 4 tests

An overview of server-side resources used by ZM Ajax Login & Register
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1857.80 ▲9.91
Dashboard /wp-admin3.58 ▲0.1736.02 ▲2.48
Posts /wp-admin/edit.php3.81 ▲0.1739.67 ▲1.98
Add New Post /wp-admin/post-new.php7.12 ▲0.1598.14 ▼1,186.04
Media Library /wp-admin/upload.php3.53 ▲0.2328.31 ▼4.48
AJAX Login & Register /wp-admin/options-general.php?page=zm_alr3.5026.55

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 70 new files
Database: no new tables, 2 new options
New WordPress options
ajax_login_register_plugin_notice_shown
zm_alr_version

Browser metrics Passed 4 tests

ZM Ajax Login & Register: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,036 ▲28217.49 ▲1.7530.68 ▲24.9924.55 ▲22.12
Dashboard /wp-admin2,906 ▲456.14 ▼0.19112.01 ▼21.69156.39 ▼3.78
Posts /wp-admin/edit.php2,705 ▲113.24 ▲0.0062.37 ▲0.90142.57 ▲0.93
Add New Post /wp-admin/post-new.php1,670 ▼10316.05 ▼5.31403.69 ▼57.11155.63 ▼4.49
Media Library /wp-admin/upload.php1,712 ▲145.58 ▲0.04136.32 ▼16.72182.35 ▼10.10
AJAX Login & Register /wp-admin/options-general.php?page=zm_alr1,1382.4254.63120.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 1 option in the database
    • zm_alr_version

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
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/zm-ajax-login-register/plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Lumber' not found in wp-content/plugins/zm-ajax-login-register/lib/quilt/quilt.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zm-ajax-login-register/deprecated.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

zm-ajax-login-register/plugin.php 92% from 13 tests

The main file in "ZM Ajax Login & Register" v. 2.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("zm-ajax-login-register.php" instead of "plugin.php")

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
No dangerous file extensions were detected7,423 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PO File181,5782,7723,480
PHP161,2551,4702,793
JavaScript514787418
CSS47610378
Markdown3630354

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.15
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods136
▷ Static methods10.74%
▷ Public methods136100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fb-icon.png0.48KB0.77KB0.00%
assets/images/facebook-screen-grab.png9.08KB2.87KB▼ 68.36%
assets/images/rectangular-banner-240x400.png9.49KB8.16KB▼ 13.96%