68% sso-flarum

Code Review | Flarum SSO WP Plugin

WordPress plugin Flarum SSO WP Plugin scored68%from 54 tests.

About plugin

  • Plugin page: sso-flarum
  • Plugin version: 2.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7
  • WordPress version: 6.3.1
  • First release: Apr 20, 2020
  • Latest release: May 23, 2021
  • Number of updates: 56
  • Update frequency: every 7.1 days
  • Top authors: maicol07 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /830 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Flarum SSO WP Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1243.29 ▼6.82
Dashboard /wp-admin3.44 ▲0.1450.82 ▼5.69
Posts /wp-admin/edit.php3.55 ▲0.2050.35 ▼2.53
Add New Post /wp-admin/post-new.php6.02 ▲0.1399.91 ▲1.75
Media Library /wp-admin/upload.php3.36 ▲0.1341.31 ▲2.22
Flarum SSO Plugin /wp-admin/options-general.php?page=sso-flarum-settings3.3437.45

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,765 new files
Database: no new tables, 9 new options
New WordPress options
flarum_sso_plugin_verify_ssl
flarum_sso_plugin_root_domain
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
flarum_sso_plugin_version
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flarum SSO WP Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.35 ▼1.008.59 ▲6.8041.43 ▼3.36
Dashboard /wp-admin2,199 ▲225.50 ▼0.0290.35 ▼1.2741.62 ▼2.64
Posts /wp-admin/edit.php2,104 ▲12.00 ▲0.0438.71 ▼0.9137.55 ▲2.04
Add New Post /wp-admin/post-new.php1,539 ▲1318.43 ▼4.71623.58 ▼47.8875.84 ▲21.68
Media Library /wp-admin/upload.php1,398 ▼24.23 ▲0.0297.47 ▼14.3642.23 ▼2.41
Flarum SSO Plugin /wp-admin/options-general.php?page=sso-flarum-settings9512.0023.6942.08

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • flarum_sso_plugin_root_domain
    • flarum_sso_plugin_verify_ssl
    • widget_recent-posts
    • flarum_sso_plugin_version
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sso-flarum/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/sso-flarum/vendor/delight-im/http/tests/index.php
    • > /wp-content/plugins/sso-flarum/vendor/mistic100/php-hooks/examples/bbcode_parser/index.php
    • > /wp-content/plugins/sso-flarum/vendor/delight-im/cookie/tests/index.php
    • > /wp-content/plugins/sso-flarum/vendor/mistic100/php-hooks/examples/youtube_tag/index.php
  • 298× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Formatter\\IntlFormatterInterface' not found in wp-content/plugins/sso-flarum/vendor/symfony/translation/Formatter/IntlFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/sso-flarum/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\otifications\\Dispatcher' not found in wp-content/plugins/sso-flarum/vendor/illuminate/support/Testing/Fakes/NotificationFake.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Queue\\QueueManager' not found in wp-content/plugins/sso-flarum/vendor/illuminate/support/Testing/Fakes/QueueFake.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/sso-flarum/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Dumper\\FileDumper' not found in wp-content/plugins/sso-flarum/vendor/symfony/translation/Dumper/XliffFileDumper.php:22
    • > PHP Warning
      require(wp-content/plugins/sso-flarum/vendor/delight-im/http/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/sso-flarum/vendor/delight-im/http/tests/index.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/sso-flarum/vendor/illuminate/support/Facades/Artisan.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/sso-flarum/vendor/illuminate/contracts/Container/BindingResolutionException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Support\\Enumerable' not found in wp-content/plugins/sso-flarum/vendor/illuminate/collections/Collection.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: flarum, php, plugin, sso, forum...

sso-flarum/sso-flarum.php Passed 13 tests

The main file in "Flarum SSO WP Plugin" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
Plugin for your WordPress website to get the SSO extension working

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/sso-flarum/vendor/nesbot/carbon/bin/carbon.bat
83,478 lines of code in 1,524 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,43512,58845,55563,188
JSON360012,066
Markdown391,81515,156
XSD392482,803
XML3111104
reStructuredText1747874
JavaScript372143
CSS26131
make1409
DOS Batch1004

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.27
▷ Minimum class complexity1.00
▷ Maximum class complexity296.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces105
Interfaces156
Traits42
Classes384
▷ Abstract classes143.65%
▷ Concrete classes37096.35%
▷ Final classes5514.86%
Methods4,262
▷ Static methods78718.47%
▷ Public methods3,69886.77%
▷ Protected methods3177.44%
▷ Private methods2475.80%
Functions626
▷ Named functions15224.28%
▷ Anonymous functions47475.72%
Constants250
▷ Global constants93.60%
▷ Class constants24196.40%
▷ Public constants23999.17%

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