83% loginmojo

Code Review | loginMojo - Login with WA

WordPress plugin loginMojo - Login with WA scored83%from 54 tests.

About plugin

  • Plugin page: loginmojo
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: May 26, 2021
  • Latest release: May 27, 2021
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: parthkanani (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /706 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.21ms] Passed 4 tests

Analyzing server-side resources used by loginMojo - Login with WA
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.26 ▼1.74
Dashboard /wp-admin3.34 ▼0.0047.06 ▼12.11
Posts /wp-admin/edit.php3.39 ▲0.0445.24 ▼0.13
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.34 ▼14.82
Media Library /wp-admin/upload.php3.27 ▲0.0434.76 ▼0.16

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: 1 new table, 8 new options
New tables
wp_lwaa_sessions
New WordPress options
theysaidso_admin_options
loginmojo_settings
loginmojo_db_version
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for loginMojo - Login with WA
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲21914.32 ▼0.285.84 ▲3.9643.69 ▲0.64
Dashboard /wp-admin2,238 ▲504.93 ▼0.98100.39 ▼14.9838.24 ▼6.29
Posts /wp-admin/edit.php2,121 ▲322.10 ▲0.1136.25 ▲1.9433.27 ▼3.92
Add New Post /wp-admin/post-new.php1,542 ▲2317.48 ▼5.83666.48 ▼25.1951.94 ▼9.65
Media Library /wp-admin/upload.php1,423 ▲354.34 ▲0.1795.69 ▼4.4740.48 ▼3.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • loginmojo_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/loginmojo/includes/functions.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/loginmojo/includes/templates/mobile_phone-field.php:1
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/loginmojo/includes/admin/class-loginmojo-admin.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/loginmojo/includes/templates/mobile_phone-field-register.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/loginmojo/includes/templates/otp-login-form.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'LOGINMOJO\\LOGINMOJO_Option' not found in wp-content/plugins/loginmojo/includes/admin/class-loginmojo-admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function send_origin_headers() in wp-content/plugins/loginmojo/includes/admin-ajax.php:23
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/loginmojo/includes/functions.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/loginmojo/includes/templates/widget.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/loginmojo/includes/functions.php on line 6

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 90% 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:
  • Donate link: Please fix this invalid URI: "paypal.me/loginmojo"
The official readme.txt might help

loginmojo/loginmojo.php 85% from 13 tests

The entry point to "loginMojo - Login with WA" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin4,084 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript927571,325
PHP172573081,247
JSON100998
CSS53216514

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.57
▷ Minimum class complexity4.00
▷ Maximum class complexity55.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods57
▷ Static methods915.79%
▷ Public methods5494.74%
▷ Protected methods00.00%
▷ Private methods35.26%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.31MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/favicon.png1.90KB1.87KB▼ 1.85%
assets/images/flags@2x.png170.28KB68.04KB▼ 60.04%
assets/images/only-countries.png17.70KB9.72KB▼ 45.12%
assets/images/loginmojo.png35.91KB17.91KB▼ 50.13%
assets/images/flags.png69.20KB23.42KB▼ 66.16%