78% ajax-login-and-registration-modal-popup

Code Review | AJAX Login and Registration modal popup + inline form

WordPress plugin AJAX Login and Registration modal popup + inline form scored78%from 54 tests.

About plugin

  • Plugin page: ajax-login-and-re...
  • Plugin version: 2.23
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 4, 2018
  • Latest release: Apr 2, 2023
  • Number of updates: 76
  • Update frequency: every 25.5 days
  • Top authors: kaminsky.m (100%)

Code review

54 tests

User reviews

117 reviews

Install metrics

7,000+ active /156,309 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.04MB] [CPU: ▲6.58ms] Passed 4 tests

A check of server-side resources used by AJAX Login and Registration modal popup + inline form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.49 ▲1.0253.73 ▲9.26
Dashboard /wp-admin4.39 ▲1.0863.92 ▲8.74
Posts /wp-admin/edit.php4.44 ▲1.0864.29 ▲10.75
Add New Post /wp-admin/post-new.php6.91 ▲1.02110.11 ▼2.45
Media Library /wp-admin/upload.php4.25 ▲1.0250.23 ▲11.79
Login/Register modal /wp-admin/options-general.php?page=login-and-register-popup4.2748.68

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 353 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
lrm_version
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for AJAX Login and Registration modal popup + inline form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲9114.41 ▲0.441.85 ▼0.3339.79 ▲0.40
Dashboard /wp-admin2,255 ▲815.56 ▼0.1084.87 ▼6.1339.19 ▼3.33
Posts /wp-admin/edit.php2,162 ▲832.14 ▲0.1542.05 ▲1.8238.14 ▲7.11
Add New Post /wp-admin/post-new.php1,580 ▲5417.92 ▼5.39634.45 ▼64.1566.42 ▲11.29
Media Library /wp-admin/upload.php1,461 ▲644.18 ▼0.07100.49 ▼13.0847.84 ▼0.78
Login/Register modal /wp-admin/options-general.php?page=login-and-register-popup1,1812.0629.5844.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • lrm_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin/settings-section/how-to-integrate-inline.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin/settings-section/how-to-integrate-modal.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/max-kk/wp-skins-customizer/includes/class-wp-skins-manager-abstract.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin-go-to-pro.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin-free_version_compatible.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin/settings-section/go-to-pro.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/max-kk/wp-notice-lib/class-admin-dismissible-notice.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/form.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin/settings-section/how-to-integrate.php
    • > /wp-content/plugins/ajax-login-and-registration-modal-popup/views/loader.php
  • 48× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin/settings-page.php:1
    • > PHP Notice
      Undefined variable: users_can_register in wp-content/plugins/ajax-login-and-registration-modal-popup/views/form-parts/register.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p4_DebugBar_Panel' not found in wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/plugin-update-checker/Puc/v4p4/DebugBar/PluginPanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p4_Vcs_Api' not found in wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/plugin-update-checker/Puc/v4p4/Vcs/GitLabApi.php:5
    • > PHP Warning
      Use of undefined constant LRM_ASSETS_URL - assumed 'LRM_ASSETS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ajax-login-and-registration-modal-popup/views/admin/settings-section/how-to-integrate-modal.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lrm_setting() in wp-content/plugins/ajax-login-and-registration-modal-popup/views/form-parts/lost-password.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p4_UpdateChecker' not found in wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/plugin-update-checker/Puc/v4p4/Theme/UpdateChecker.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/max-kk/wp-notice-lib/views/admin-notice.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'LRM_Settings' not found in wp-content/plugins/ajax-login-and-registration-modal-popup/views/restore-password.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p4_DebugBar_Extension' not found in wp-content/plugins/ajax-login-and-registration-modal-popup/vendor/plugin-update-checker/Puc/v4p4/DebugBar/PluginExtension.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: ajax, register, registration, popup, login...

ajax-login-and-registration-modal-popup/ajax-login-registration-modal-popup.php 85% from 13 tests

Analyzing the main PHP file in "AJAX Login and Registration modal popup + inline form" version 2.23
The following require your attention:
  • Git Repository: Please remove the Git repository from this plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("ajax-login-and-registration-modal-popup.php" instead of "ajax-login-registration-modal-popup.php")

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 detected43,659 lines of code in 266 files:
LanguageFilesBlank linesComment linesLines of code
PHP1203,2804,18311,146
CSS293,77418810,628
Sass397691597,090
PO File312,1513,1264,889
SVG200114,859
JavaScript107081,0483,413
HTML3661,166
Markdown3890254
JSON900176
XML21038

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.76
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes85
▷ Abstract classes1112.94%
▷ Concrete classes7487.06%
▷ Final classes00.00%
Methods653
▷ Static methods9514.55%
▷ Public methods47973.35%
▷ Protected methods15724.04%
▷ Private methods172.60%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/login.png1.89KB1.93KB0.00%
assets/img/user.png1.35KB1.59KB0.00%