84% pt-wp-discourse-sso

Code Review | PrimeTime WordPress + Discourse SSO

WordPress plugin PrimeTime WordPress + Discourse SSO scored84%from 54 tests.

About plugin

  • Plugin page: pt-wp-discourse-sso
  • Plugin version: 0.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2014
  • Latest release: May 4, 2015
  • Number of updates: 15
  • Update frequency: every 8.9 days
  • Top authors: etcio (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

40+ active /5,826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼2.81ms] Passed 4 tests

Server-side resources used by PrimeTime WordPress + Discourse SSO
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.56 ▼8.92
Dashboard /wp-admin3.52 ▲0.2257.24 ▲3.13
Posts /wp-admin/edit.php3.57 ▲0.2158.21 ▲6.68
Add New Post /wp-admin/post-new.php6.01 ▲0.1390.72 ▼8.44
Media Library /wp-admin/upload.php3.36 ▲0.1339.00 ▲3.01
WP Discourse SSO /wp-admin/options-general.php?page=wp-sso-settings3.3538.62

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for PrimeTime WordPress + Discourse SSO
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲22214.67 ▲0.111.78 ▼0.1042.76 ▲0.42
Dashboard /wp-admin2,386 ▲2186.34 ▲0.65119.58 ▲31.4142.36 ▼0.97
Posts /wp-admin/edit.php2,326 ▲2263.63 ▲1.6057.08 ▲19.5333.83 ▼0.31
Add New Post /wp-admin/post-new.php1,571 ▲4323.26 ▲0.06633.99 ▼40.0137.89 ▼15.03
Media Library /wp-admin/upload.php1,460 ▲634.26 ▲0.1690.95 ▼30.7144.12 ▼3.36
WP Discourse SSO /wp-admin/options-general.php?page=wp-sso-settings1,0823.5546.7030.46

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • pt_wp_sso_settings
    • db_upgraded
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pt-wp-discourse-sso/admin/includes/class.settings.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: The official readme.txt might help

pt-wp-discourse-sso/pt-wp-discourse-sso.php Passed 13 tests

The main PHP script in "PrimeTime WordPress + Discourse SSO" version 0.2.3 is automatically included on every request by WordPress
46 characters long description:
Single Sign on between WordPress and Discourse

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
There were no executable files found in this plugin622 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8165418613
JSON1009

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.00
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods713.46%
▷ Public methods4382.69%
▷ Protected methods00.00%
▷ Private methods917.31%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin