82% external-login

Code Review | External Login

WordPress plugin External Login scored 82% from 54 tests.

About plugin

  • Plugin page: external-login
  • Plugin version: 1.11.2
  • PHP compatiblity: 5.6.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6.1
  • WordPress version: 5.8.1
  • First release: Feb 4, 2018
  • Latest release: Feb 7, 2021
  • Number of updates: 64
  • Update frequency: every 17.2 days
  • Top authors: tbenyon (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

3,000+ active / 17,079 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼142.28ms] Passed 4 tests

This is a short check of server-side resources used by External Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.1735.93 ▲3.87
Dashboard /wp-admin3.32 ▲0.2757.75 ▲10.53
Posts /wp-admin/edit.php3.44 ▲0.3347.34 ▼3.63
Add New Post /wp-admin/post-new.php5.67 ▲0.2485.09 ▼570.28
Media Library /wp-admin/upload.php3.27 ▲0.2734.41 ▲0.92
External Login /wp-admin/options-general.php?page=external-login3.2744.70

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 42 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by External Login
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.81 ▼0.1113.23 ▲4.2246.96 ▼2.73
Dashboard /wp-admin2,972 ▲356.07 ▼0.09142.77 ▼4.39115.08 ▲4.95
Posts /wp-admin/edit.php2,741 ▲22.70 ▼0.0063.38 ▼5.8481.98 ▼6.49
Add New Post /wp-admin/post-new.php1,883 ▲21119.13 ▲0.05408.22 ▼10.24123.52 ▲17.91
Media Library /wp-admin/upload.php1,812 ▲55.04 ▲0.03147.93 ▼6.23122.35 ▲5.08
External Login /wp-admin/options-general.php?page=external-login2,5622.5863.76101.27

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
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=external-login
    • > Notice in wp-content/plugins/external-login/views/form_elements/repeater_field.php+33
    Undefined index: slug

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/external-login/views/modal.php
    • > /wp-content/plugins/external-login/views/form_elements/role_field.php
    • > /wp-content/plugins/external-login/views/form_elements/button.php
    • > /wp-content/plugins/external-login/views/partials/wpconfig_option_set_message.php
  • 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/external-login/views/form_elements/checkbox_field.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/external-login/options/options_external_login.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/external-login/views/partials/wpconfig_option_set_message.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/external-login/views/form_elements/button.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function exlog_is_wpconfig_option_set() in wp-content/plugins/external-login/views/form_elements/repeater_field.php:20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/external-login/views/form_elements/repeater_field.php on line 2
    • > PHP Notice
      Undefined variable: form_field in wp-content/plugins/external-login/views/form_elements/text_field.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/external-login/options/cleanup.php:3
    • > PHP Notice
      Undefined variable: form_field in wp-content/plugins/external-login/views/form_elements/button.php on line 6
    • > PHP Notice
      Undefined variable: exlog_test_results_data in wp-content/plugins/external-login/views/test_results.php on line 1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Main Settings View) image missing
You can take inspiration from this readme.txt

external-login/external-login.php Passed 13 tests

Analyzing the main PHP file in "External Login" version 1.11.2
61 characters long description:
A plugin to allow login and syncing from a secondary database

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,575 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP28187541,450
JavaScript59136537
Sass5491326
CSS150239
SVG10123

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity5.67
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods10
▷ Static methods220.00%
▷ Public methods660.00%
▷ Protected methods00.00%
▷ Private methods440.00%
Functions31
▷ Named functions2890.32%
▷ Anonymous functions39.68%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin