10% magical-login

Code Review | Magical Login

WordPress plugin Magical Login scored 10% from 53 tests.

About plugin

  • Plugin page: magical-login
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1.8+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.8
  • WordPress version: 5.8.1
  • First release: Nov 5, 2018
  • Latest release: Nov 6, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: alijenabi (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 326 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/magical-login/admin/tabs.php+7
    include_once(/var/www/wordpress/wp-content/plugins/magical-login/admin/tab-stlyes.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.67MB] [CPU: ▼328.27ms] Passed 4 tests

Server-side resources used by Magical Login
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.96 ▼0.886.57 ▼24.76
Dashboard /wp-admin1.98 ▼1.0810.56 ▼37.33
Posts /wp-admin/edit.php1.98 ▼1.136.84 ▼34.66
Add New Post /wp-admin/post-new.php1.98 ▼3.457.86 ▼1,210.50
Media Library /wp-admin/upload.php1.98 ▼1.037.96 ▼30.60
Magical Login /wp-admin/options-general.php/eex_up_magical_login_1.987.23

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 4 new options
New WordPress options
eex_up_email_login_alowed
eex_up_username_login_alowed
eex_up_username_recovery_alowed
eex_up_email_recovery_alowed

Browser metrics Passed 4 tests

An overview of browser requirements for Magical Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,659 ▲5316.13 ▲0.567.28 ▼0.3045.11 ▲2.85
Dashboard /wp-admin2,940 ▲846.06 ▲0.22135.10 ▼10.1499.82 ▼6.89
Posts /wp-admin/edit.php2,716 ▲102.69 ▼0.0063.99 ▼8.3278.33 ▼19.62
Add New Post /wp-admin/post-new.php1,860 ▲20718.76 ▼0.04370.64 ▲2.81110.44 ▲6.43
Media Library /wp-admin/upload.php1,782 ▲75.01 ▼0.03155.83 ▲0.66113.17 ▼9.97
Magical Login /wp-admin/options-general.php/eex_up_magical_login_4,7482.1265.18170.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/magical-login/admin/tabs.php+7
    include_once(/var/www/wordpress/wp-content/plugins/magical-login/admin/tab-stlyes.php): failed to open stream: No such file or directory

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php/eex_up_magical_login_
    • > Warning in wp-content/plugins/magical-login/admin/tabs.php+7
    include_once(/var/www/wordpress/wp-content/plugins/magical-login/admin/tab-stlyes.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php/eex_up_magical_login_
    • > Warning in wp-content/plugins/magical-login/admin/tabs.php+7
    include_once(): Failed opening '/var/www/wordpress/wp-content/plugins/magical-login/admin/tab-stlyes.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/options-general.php/eex_up_magical_login_
    • > Notice in wp-content/plugins/magical-login/character.php+8
    Undefined index: page
    • > GET request to /wp-admin/options-general.php/eex_up_magical_login_
    • > User deprecated in wp-includes/functions.php+5211
    sanitize_url is deprecated since version 2.8.0! Use esc_url_raw() instead.

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
Please take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/magical-login/character.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magical-login/admin/tab-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magical-login/globals.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/magical-login/shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magical-login/magical-login.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magical-login/admin/menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magical-login/admin/tabs.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magical-login/global/db.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
8 plugin tags: form, login, recovery, user, password...

magical-login/magical-login.php 92% from 13 tests

The primary PHP file in "Magical Login" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,392 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12941401,319
CSS34754
JavaScript15519

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin