90% tims-nextcloud-sso-oauth2

Code Review | Tim's Nextcloud SSO OAuth2

WordPress plugin Tim's Nextcloud SSO OAuth2 scored 90% from 54 tests.

About plugin

  • Plugin page: tims-nextcloud-ss...
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 11, 2022
  • Latest release: Aug 11, 2023
  • Number of updates: 23
  • Update frequency: every 23.7 days
  • Top authors: TimsSolutions (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active / 2,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.07ms] Passed 4 tests

Server-side resources used by Tim's Nextcloud SSO OAuth2
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1435.33 ▼7.57
Dashboard /wp-admin3.45 ▲0.1545.85 ▼3.58
Posts /wp-admin/edit.php3.50 ▲0.1548.16 ▼3.48
Add New Post /wp-admin/post-new.php6.03 ▲0.1591.83 ▼13.64
Media Library /wp-admin/upload.php3.37 ▲0.1440.96 ▲7.23
Nextcloud OAuth2 /wp-admin/options-general.php?page=tims-nextcloud-sso-oauth2/includes/options-page.php3.3437.51

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Tim's Nextcloud SSO OAuth2
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▲0.041.91 ▼0.0340.59 ▼5.82
Dashboard /wp-admin2,210 ▲224.86 ▼0.05110.24 ▲7.1040.46 ▼2.12
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0939.16 ▼3.9234.65 ▼0.88
Add New Post /wp-admin/post-new.php1,531 ▼223.07 ▲0.01623.81 ▲24.5951.34 ▼0.47
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.0397.15 ▼1.6942.47 ▼1.07
Nextcloud OAuth2 /wp-admin/options-general.php?page=tims-nextcloud-sso-oauth2/includes/options-page.php1,2571.8729.2561.18

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: nextcloud, single sign-on, oauth 20, wordpress sso, login

tims-nextcloud-sso-oauth2/tims-nextcloud-sso-oauth2.php Passed 13 tests

Analyzing the main PHP file in "Tim's Nextcloud SSO OAuth2" version 2.0.2
83 characters long description:
Enables you to login to your WordPress site with your Nextcloud account with OAuth2

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 detected1,138 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP413958621
PO File2140151414
Sass130102
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin