84% eidlogin

Code Review | eID-Login

WordPress plugin eID-Login scored84%from 54 tests.

About plugin

  • Plugin page: eidlogin
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2021
  • Latest release: Oct 27, 2023
  • Number of updates: 10
  • Update frequency: every 80.7 days
  • Top authors: eidlogin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,241 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: ▲1.04MB] [CPU: ▲2.44ms] Passed 4 tests

Server-side resources used by eID-Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.53 ▲1.0646.78 ▲9.66
Dashboard /wp-admin4.36 ▲1.0550.20 ▲1.21
Posts /wp-admin/edit.php4.41 ▲1.0549.24 ▲2.38
Add New Post /wp-admin/post-new.php6.89 ▲1.0196.58 ▲1.88
Media Library /wp-admin/upload.php4.28 ▲1.0540.01 ▲4.28
eID-Login /wp-admin/options-general.php?page=eidlogin-settings7.1654.68

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 300 new files
Database: 4 new tables, 7 new options
New tables
wp_eidlogin_eid_attributes
wp_eidlogin_eid_responsedata
wp_eidlogin_eid_continuedata
wp_eidlogin_eid_users
New WordPress options
eidlogin_version
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for eID-Login
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.33 ▼0.081.71 ▼0.0344.79 ▲0.03
Dashboard /wp-admin2,199 ▲245.66 ▼0.0183.78 ▼19.2039.11 ▼1.05
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0434.80 ▼6.0733.42 ▼3.06
Add New Post /wp-admin/post-new.php1,540 ▲1218.23 ▼4.85633.60 ▼62.7661.54 ▲2.66
Media Library /wp-admin/upload.php1,404 ▲14.20 ▲0.03102.57 ▲4.1342.95 ▼3.72
eID-Login /wp-admin/options-general.php?page=eidlogin-settings7792.0532.7726.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 150× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\CallExpression' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Node/Expression/FunctionExpression.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Error/SyntaxError.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Error\\Error' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Sandbox/SecurityError.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Node/Expression/NameExpression.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/TokenParser/WithTokenParser.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/eidlogin/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: security, authentication, eid

eidlogin/eidlogin.php 92% from 13 tests

The principal PHP file in "eID-Login" v. 1.0.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 377 characters long)

Code Analysis 97% from 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
No dangerous file extensions were detected46,663 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
PHP2467,57420,51540,560
XSD172753583,473
PO File1150154664
HTML81074534
JavaScript18677509
JSON310476
CSS3708301
SVG201128
reStructuredText18510
Markdown1408

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity28.32
▷ Minimum class complexity1.00
▷ Maximum class complexity644.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces36
Interfaces11
Traits0
Classes224
▷ Abstract classes125.36%
▷ Concrete classes21294.64%
▷ Final classes5626.42%
Methods1,848
▷ Static methods1296.98%
▷ Public methods1,67990.85%
▷ Protected methods522.81%
▷ Private methods1176.33%
Functions105
▷ Named functions8379.05%
▷ Anonymous functions2220.95%
Constants432
▷ Global constants388.80%
▷ Class constants39491.20%
▷ Public constants394100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
saml/images/help-icon.png0.58KB0.44KB▼ 23.22%
admin/images/saml-wordpress.png49.87KB15.78KB▼ 68.36%
admin/images/login-screenshot.png19.69KB4.24KB▼ 78.47%
saml/images/eID-Login.png2.62KB1.80KB▼ 31.31%