84% indieauth

Code Review | IndieAuth

WordPress plugin IndieAuth scored84%from 54 tests.

About plugin

  • Plugin page: indieauth
  • Plugin version: 4.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-6.4
  • WordPress version: 6.3.1
  • First release: Sep 16, 2013
  • Latest release: Dec 2, 2023
  • Number of updates: 81
  • Update frequency: every 46.1 days
  • Top authors: indieweb (90.12%)pfefferle (11.11%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /20,024 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
Install script ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▲2.66ms] Passed 4 tests

Server-side resources used by IndieAuth
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.7446.27 ▲1.09
Dashboard /wp-admin4.05 ▲0.7453.34 ▲3.97
Posts /wp-admin/edit.php4.16 ▲0.8054.93 ▲1.09
Add New Post /wp-admin/post-new.php6.65 ▲0.7693.37 ▲6.24
Media Library /wp-admin/upload.php3.97 ▲0.7441.16 ▲4.48
IndieAuth /wp-admin/options-general.php?page=indieauth3.9657.08
Manage Tokens /wp-admin/users.php?page=indieauth_user_token4.0038.72

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
_indieauth_token_ids
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by IndieAuth
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.72 ▲0.341.76 ▲0.2043.22 ▲0.57
Dashboard /wp-admin2,203 ▲365.64 ▼0.0391.10 ▼17.8039.54 ▼4.06
Posts /wp-admin/edit.php2,108 ▲51.94 ▼0.0338.73 ▼3.0436.37 ▼3.13
Add New Post /wp-admin/post-new.php1,532 ▲623.30 ▲0.14683.08 ▲54.2863.35 ▲4.42
Media Library /wp-admin/upload.php1,408 ▲54.18 ▲0.0197.05 ▼10.7842.07 ▼3.65
IndieAuth /wp-admin/options-general.php?page=indieauth9752.0224.8631.07
Manage Tokens /wp-admin/users.php?page=indieauth_user_token1,0472.1324.2127.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • _indieauth_token_ids
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/indieauth/includes/class-indieauth-client-taxonomy.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'IndieAuth_Endpoint' not found in wp-content/plugins/indieauth/includes/class-indieauth-revocation-endpoint.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/indieauth/templates/authdiagfail.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function login_header() in wp-content/plugins/indieauth/templates/websignin-form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Error' not found in wp-content/plugins/indieauth/templates/indieauth-authenticate-form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Token_Generic' not found in wp-content/plugins/indieauth/includes/class-token-transient.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/indieauth/includes/class-external-token-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/indieauth/includes/class-token-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Response' not found in wp-content/plugins/indieauth/includes/class-oauth-response.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/indieauth/templates/indieauth-settings.php:2

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: indieweb, login, indiewebcamp, indieauth

indieauth/indieauth.php Passed 13 tests

"IndieAuth" version 4.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
98 characters long description:
IndieAuth is a way to allow users to use their own domain to sign into other websites and services

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected4,446 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP366371,0974,446

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.35
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes27.69%
▷ Concrete classes2492.31%
▷ Final classes14.17%
Methods254
▷ Static methods4517.72%
▷ Public methods24395.67%
▷ Protected methods51.97%
▷ Private methods62.36%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected