84% digi-id-authentication

Code Review | Digi-ID Authentication

WordPress plugin Digi-ID Authentication scored 84% from 54 tests.

About plugin

  • Plugin page: digi-id-authentic...
  • Plugin version: 1.0.15
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2019
  • Latest release: Nov 2, 2022
  • Number of updates: 43
  • Update frequency: every 30.1 days
  • Top authors: cept (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.79ms] Passed 4 tests

Analyzing server-side resources used by Digi-ID Authentication
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.90 ▼5.97
Dashboard /wp-admin3.31 ▲0.0044.78 ▼14.04
Posts /wp-admin/edit.php3.36 ▲0.0046.06 ▼2.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.99 ▼5.04
Media Library /wp-admin/upload.php3.23 ▲0.0035.65 ▲2.88

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Digi-ID Authentication: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.20 ▼1.414.78 ▲2.5539.71 ▼8.74
Dashboard /wp-admin2,206 ▲185.86 ▲0.99106.16 ▼9.8042.26 ▼0.75
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0440.66 ▲4.2235.51 ▲2.52
Add New Post /wp-admin/post-new.php1,529 ▼1318.16 ▼0.12627.61 ▼2.0865.39 ▲15.25
Media Library /wp-admin/upload.php1,388 ▲34.28 ▲0.0193.92 ▼3.1542.10 ▲0.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/digi-id-authentication/classes/DigiIDAddress.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'DigiIdAuthentication\\classes\\PublicKeyInterface' not found in wp-content/plugins/digi-id-authentication/classes/PublicKey.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/digi-id-authentication/classes/MyDigiIdAddresses.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
4 plugin tags: digibyte, digiid, digi-id, authentication

digi-id-authentication/digiid-wp-authentication.php 92% from 13 tests

The principal PHP file in "Digi-ID Authentication" v. 1.0.15 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("digi-id-authentication.php" instead of "digiid-wp-authentication.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,517 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP185946211,955
JavaScript28562338
CSS12613169
HTML615155

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.93
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces2
Interfaces4
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods131
▷ Static methods2821.37%
▷ Public methods12595.42%
▷ Protected methods00.00%
▷ Private methods64.58%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png48.48KB13.34KB▼ 72.48%
assets/completed-qr.png17.60KB6.42KB▼ 63.55%
assets/icon-256x256.png34.61KB12.76KB▼ 63.12%
assets/show-qr.png14.38KB5.48KB▼ 61.91%
assets/banner-772x250.png38.65KB12.97KB▼ 66.44%