78% magic-link-login

Code Review | Magic Login Link

WordPress plugin Magic Login Link scored78%from 54 tests.

About plugin

  • Plugin page: magic-link-login
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 28, 2018
  • Latest release: Mar 28, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: smtisipp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▼2.28ms] Passed 4 tests

A check of server-side resources used by Magic Login Link
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5141.78 ▼7.85
Dashboard /wp-admin3.81 ▲0.5053.35 ▼0.16
Posts /wp-admin/edit.php3.86 ▲0.5056.24 ▲2.17
Add New Post /wp-admin/post-new.php6.39 ▲0.5099.38 ▼3.26
Media Library /wp-admin/upload.php3.73 ▲0.5042.49 ▲2.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 254 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Magic Login Link
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.71 ▲0.181.59 ▼0.6441.92 ▼6.61
Dashboard /wp-admin2,198 ▲245.61 ▼0.0692.23 ▼1.9940.64 ▲0.53
Posts /wp-admin/edit.php2,100 ▼02.09 ▲0.0940.44 ▼1.8837.68 ▼1.13
Add New Post /wp-admin/post-new.php1,528 ▲223.02 ▼0.08599.60 ▼77.8953.96 ▼7.13
Media Library /wp-admin/upload.php1,397 ▼04.19 ▲0.00101.36 ▼14.2044.10 ▼3.57

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/magic-link-login/vendor/smarty/smarty/demo/index.php
  • 81× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_call.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_CacheResource' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_Resource_File' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_php.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_Data' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_CacheResource' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_cacheresource_file.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_CompileBase' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_include_php.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Internal_Resource_Extends' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/demo/plugins/resource.extendsall.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Smarty_Resource' not found in wp-content/plugins/magic-link-login/vendor/smarty/smarty/libs/sysplugins/smarty_internal_resource_registered.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% 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
4 plugin tags: magic, login, passwordless login, magic login

magic-link-login/amc-spark.php 77% from 13 tests

The main PHP script in "Magic Login Link" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("magic-link-login.php" instead of "amc-spark.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected18,745 lines of code in 236 files:
LanguageFilesBlank linesComment linesLines of code
PHP2262,72812,11618,330
Smarty3462203
JSON20071
Markdown120045
PO File17841
Sass13023
CSS13117
JavaScript11115

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity14.94
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes189
▷ Abstract classes126.35%
▷ Concrete classes17793.65%
▷ Final classes00.00%
Methods967
▷ Static methods353.62%
▷ Public methods89592.55%
▷ Protected methods495.07%
▷ Private methods232.38%
Functions62
▷ Named functions6198.39%
▷ Anonymous functions11.61%
Constants164
▷ Global constants74.27%
▷ Class constants15795.73%
▷ Public constants157100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin