10% digilan-token

Code Review | Digilan Token

WordPress plugin Digilan Token scored10%from 54 tests.

About plugin

  • Plugin page: digilan-token
  • Plugin version: 2.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.5.3
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: Feb 24, 2021
  • Number of updates: 7
  • Update frequency: every 77.9 days
  • Top authors: digilan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /938 total downloads

Benchmarks

Plugin footprint 40% 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
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/digilan-token/includes/digilan-db.php+139
    Non-static method DigilanTokenDB::wp_digilan_token_users() should not be called statically

Server metrics [RAM: ▼0.49MB] [CPU: ▼10.37ms] Passed 4 tests

Analyzing server-side resources used by Digilan Token
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.93 ▼3.94
Dashboard /wp-admin3.51 ▲0.2048.69 ▲0.34
Posts /wp-admin/edit.php3.56 ▲0.2047.33 ▲3.36
Add New Post /wp-admin/post-new.php3.32 ▼2.5650.26 ▼39.20
Media Library /wp-admin/upload.php3.43 ▲0.2037.23 ▲1.33

Server storage [IO: ▲1.83MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 102 new files
Database: 7 new tables, 11 new options
New tables
wp_digilan_token_users_1
wp_digilan_token_active_sessions_1
wp_digilan_token_version
wp_digilan_token_logs
wp_digilan_token_connections_1
wp_digilan_token_logs_archive
wp_digilan_token_social_users_1
New WordPress options
widget_theysaidso_widget
digilan_token_version
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_digilan-token_schedule
widget_digilan-token_social_login
can_compress_scripts
widget_recent-comments
widget_digilan-token_wifi4eu
...

Browser metrics Passed 4 tests

An overview of browser requirements for Digilan Token
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.21 ▼1.381.94 ▲0.0048.10 ▲3.77
Dashboard /wp-admin2,215 ▲274.94 ▲0.05109.33 ▼4.2842.08 ▼4.91
Posts /wp-admin/edit.php2,101 ▲122.02 ▼0.0235.56 ▼1.7432.63 ▼2.97
Add New Post /wp-admin/post-new.php1,529 ▲1523.26 ▲5.71571.48 ▼125.2949.51 ▼5.02
Media Library /wp-admin/upload.php1,400 ▲154.35 ▲0.0697.39 ▼6.6941.02 ▼4.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 7 tables
    • wp_digilan_token_version
    • wp_digilan_token_logs_archive
    • wp_digilan_token_social_users_1
    • wp_digilan_token_logs
    • wp_digilan_token_connections_1
    • wp_digilan_token_users_1
    • wp_digilan_token_active_sessions_1
  • Zombie WordPress options were found after uninstall: 11 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_digilan-token_wifi4eu
    • widget_digilan-token_social_login
    • widget_recent-comments
    • digilan_token_version
    • widget_digilan-token_schedule
    • can_compress_scripts
    • ...

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/digilan-token/digilan-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'DLT\\Persistent\\Storage\\StorageAbstract' not found in wp-content/plugins/digilan-token/DLT/Persistent/Storage/Session.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/digilan-token/digilan-noaccess-widget.php:18
    • > PHP Warning
      require_once(DLT_PATH/includes/digilan-userData.php): failed to open stream: No such file or directory in wp-content/plugins/digilan-token/includes/digilan-social-user.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/digilan-token/digilan-token.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/digilan-token/admin/templates/fix-redirect-uri.php:19
    • > PHP Warning
      require_once(DLT_PATH/includes/digilan-auth.php): failed to open stream: No such file or directory in wp-content/plugins/digilan-token/includes/digilan-oauth2.php on line 17
    • > PHP Fatal error
      require_once(): Failed opening required 'DLT_PATH/includes/digilan-oauth2.php' (include_path='.:/usr/share/php') in wp-content/plugins/digilan-token/providers/facebook/facebook-client.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'DigilanTokenSocialProvider' not found in wp-content/plugins/digilan-token/providers/twitter/twitter.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/digilan-token/admin/templates/menu.php:19

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: digilan, token, authenticator, third party

digilan-token/digilan-token.php 92% from 13 tests

The principal PHP file in "Digilan Token" v. 2.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected37,226 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript164,1073,15628,378
PHP561,0671,6197,143
PO File24655961,256
CSS38811427
JSON10022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.50
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes34
▷ Abstract classes514.71%
▷ Concrete classes2985.29%
▷ Final classes00.00%
Methods403
▷ Static methods13433.25%
▷ Public methods31277.42%
▷ Protected methods4811.91%
▷ Private methods4310.67%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.15MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/exclamation-mark.png1.23KB0.98KB▼ 20.27%
css/DataTables-1.10.18/images/sort_both.png0.20KB0.29KB0.00%
providers/twitter/twitter.png2.01KB1.19KB▼ 40.88%
css/DataTables-1.10.18/images/sort_desc_disabled.png0.14KB0.25KB0.00%
providers/transparent/transparent.png38.09KB11.31KB▼ 70.32%