78% openid

Code Review | OpenID

WordPress plugin OpenID scored78%from 54 tests.

About plugin

  • Plugin page: openid
  • Plugin version: 3.6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Feb 8, 2007
  • Latest release: Jun 12, 2022
  • Number of updates: 272
  • Update frequency: every 20.6 days
  • Top authors: wnorris (91.54%)pfefferle (4.41%)willnorris (4.04%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /211,726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.24ms] Passed 4 tests

This is a short check of server-side resources used by OpenID
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0946.96 ▲2.73
Dashboard /wp-admin3.46 ▲0.1552.44 ▼3.43
Posts /wp-admin/edit.php3.51 ▲0.1557.63 ▲1.87
Add New Post /wp-admin/post-new.php5.97 ▲0.0888.84 ▼18.12
Media Library /wp-admin/upload.php3.31 ▲0.0942.95 ▲5.18
Your Trusted Sites /wp-admin/users.php?page=openid_trusted_sites3.2636.25
Your OpenIDs /wp-admin/users.php?page=your_openids3.2834.52
OpenID /wp-admin/options-general.php?page=openid3.2834.61

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 84 new files
Database: 1 new table, 13 new options
New tables
wp_openid_identities
New WordPress options
widget_recent-comments
openid_comment_displayname_length
can_compress_scripts
theysaidso_admin_options
openid_plugin_enabled
widget_recent-posts
widget_theysaidso_widget
openid_plugin_revision
openid_db_revision
openid_enable_approval
...

Browser metrics Passed 4 tests

A check of browser resources used by OpenID
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8913.25 ▼1.501.81 ▲0.1643.65 ▼1.19
Dashboard /wp-admin2,236 ▲364.83 ▼1.06113.31 ▲3.4938.39 ▼3.84
Posts /wp-admin/edit.php2,119 ▲192.02 ▲0.0141.65 ▼0.7036.02 ▼1.62
Add New Post /wp-admin/post-new.php1,554 ▲2823.13 ▲5.56683.44 ▲51.3257.21 ▲6.68
Media Library /wp-admin/upload.php1,415 ▲214.23 ▼0.02109.27 ▲7.0746.33 ▲0.22
Your Trusted Sites /wp-admin/users.php?page=openid_trusted_sites9142.0224.0627.42
Your OpenIDs /wp-admin/users.php?page=your_openids8802.0525.5325.98
OpenID /wp-admin/options-general.php?page=openid1,0452.0924.7330.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/users.php?page=openid_trusted_sites
    • > Notice in wp-content/plugins/openid/admin_panels.php+435
    Undefined index: action

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 80× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/openid/comments.php:9
    • > PHP Warning
      require_once(Auth/OpenID.php): failed to open stream: No such file or directory in wp-content/plugins/openid/lib/Auth/OpenID/Message.php on line 12
    • > PHP Fatal error
      require_once(): Failed opening required 'Auth/Yadis/Misc.php' (include_path='.:/usr/share/php') in wp-content/plugins/openid/lib/Auth/OpenID/URINorm.php on line 12
    • > PHP Warning
      require_once(Auth/OpenID/SReg.php): failed to open stream: No such file or directory in wp-content/plugins/openid/server_ext.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'Auth/OpenID/CryptUtil.php' (include_path='.:/usr/share/php') in wp-content/plugins/openid/lib/Auth/OpenID/Association.php on line 20
    • > PHP Fatal error
      require_once(): Failed opening required 'Auth/OpenID.php' (include_path='.:/usr/share/php') in wp-content/plugins/openid/lib/Auth/OpenID/DiffieHellman.php on line 17
    • > PHP Warning
      require_once(Auth/Yadis/HTTPFetcher.php): failed to open stream: No such file or directory in wp-content/plugins/openid/lib/Auth/Yadis/PlainHTTPFetcher.php on line 20
    • > PHP Fatal error
      require_once(): Failed opening required 'Auth/Yadis/PlainHTTPFetcher.php' (include_path='.:/usr/share/php') in wp-content/plugins/openid/lib/Auth/OpenID.php on line 28
    • > PHP Warning
      require_once(Auth/OpenID/Message.php): failed to open stream: No such file or directory in wp-content/plugins/openid/lib/Auth/OpenID/SReg.php on line 45
    • > PHP Warning
      require_once(Auth/OpenID.php): failed to open stream: No such file or directory in wp-content/plugins/openid/lib/Auth/OpenID/Consumer.php on line 163

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Commentors can use their OpenID when leaving a comment), #2 (Users can login with their OpenID in place of a traditional username and password), #3 (Users authorized to use the OpenID Provider can delegate to a different provider), #4 (Users can add additional OpenIDs which they can use to login to WordPress), #5 (Users authorized to use the OpenID Provider can monitor which sites they've logged in to)
The official readme.txt might help

openid/openid.php 92% from 13 tests

This is the main PHP file of "OpenID" version 3.6.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 167 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected14,518 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP513,0876,65712,169
PO File99311,3932,282
JavaScript2121448
CSS14419

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes96
▷ Abstract classes22.08%
▷ Concrete classes9497.92%
▷ Final classes00.00%
Methods573
▷ Static methods6711.69%
▷ Public methods56598.60%
▷ Protected methods61.05%
▷ Private methods20.35%
Functions224
▷ Named functions22098.21%
▷ Anonymous functions41.79%
Constants77
▷ Global constants77100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.90KB6.04KB▼ 62.02%
f/icon.png1.57KB1.56KB0.44%
screenshot-5.png53.03KB17.53KB▼ 66.95%
screenshot-4.png49.40KB15.89KB▼ 67.83%
screenshot-3.png26.64KB8.10KB▼ 69.60%