58% taplogin

Code Review | Teddy ID

WordPress plugin Teddy ID scored58%from 54 tests.

About plugin

  • Plugin page: taplogin
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Dec 13, 2013
  • Latest release: Sep 11, 2015
  • Number of updates: 10
  • Update frequency: every 63.8 days
  • Top authors: matrixplatform (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /899 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.36MB] [CPU: ▼52.68ms] Passed 4 tests

Analyzing server-side resources used by Teddy ID
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7612.88 ▼50.96
Dashboard /wp-admin2.78 ▼0.5222.78 ▼33.63
Posts /wp-admin/edit.php2.79 ▼1.0615.59 ▼34.00
Add New Post /wp-admin/post-new.php2.78 ▼3.1117.69 ▼92.12
Media Library /wp-admin/upload.php2.78 ▼0.4512.91 ▼21.36
TeddyID Integration /wp-admin/options-general.php?page=taplogin_setup2.7915.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: 1 new table, 7 new options
New tables
wp_taplogin_users
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
taplogin_secret_key
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Teddy ID
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲8913.50 ▼0.698.24 ▲6.3441.70 ▼5.61
Dashboard /wp-admin2,199 ▲255.59 ▼0.1191.71 ▼2.5342.28 ▲3.91
Posts /wp-admin/edit.php2,101 ▲42.01 ▼0.0138.52 ▲3.0034.98 ▲3.25
Add New Post /wp-admin/post-new.php1,529 ▼823.34 ▲4.97669.58 ▲1.7654.73 ▼15.64
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.0098.35 ▼10.8544.49 ▼1.43
TeddyID Integration /wp-admin/options-general.php?page=taplogin_setup8381.9925.8328.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/taplogin/taplogin.php+115
    Undefined index: auth_token_id
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_taplogin_users
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • taplogin_secret_key

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?page=taplogin_setup
    • > Notice in wp-content/plugins/taplogin/taplogin.php+115
    Undefined index: auth_token_id
    • > GET request to /wp-admin/options-general.php?page=taplogin_setup
    • > Notice in wp-content/plugins/taplogin/taplogin.php+117
    Undefined index: teddyid_request_id
    • > GET request to /wp-admin/options-general.php?page=taplogin_setup
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method TeddyID::add_admin_menu() should not be called statically

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
Almost there! Just fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Stateless' not found in wp-content/plugins/taplogin/lib/MatrixCommunication.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stateless' not found in wp-content/plugins/taplogin/lib/SecureRandom.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'MatrixCommunication' not found in wp-content/plugins/taplogin/lib/TapAuthorization.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/taplogin/taplogin.php:463
    • > PHP Fatal error
      Uncaught Error: Class 'MatrixCommunication' not found in wp-content/plugins/taplogin/lib/AuthConfirmation.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stateless' not found in wp-content/plugins/taplogin/lib/TokenManager.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stateless' not found in wp-content/plugins/taplogin/lib/EnvConf.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: A description for screenshot #2 is required in taplogin/assets to your readme.txt
  • Donate link: Please fix this invalid url: "N/A"
You can take inspiration from this readme.txt

taplogin/taplogin.php Passed 13 tests

The entry point to "Teddy ID" version 1.2.1 is a PHP file that has certain tags in its header comment area
102 characters long description:
Allow your visitors to log in by tapping just one button on their phones, without entering a password.

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
Success! There were no dangerous files found in this plugin756 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP887111618
PO File1172285
HTML12053

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.30
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods30
▷ Static methods2996.67%
▷ Public methods1860.00%
▷ Protected methods13.33%
▷ Private methods1136.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin