58% wp-oauth-integration

Code Review | WP OAuth Integration

WordPress plugin WP OAuth Integration scored58%from 54 tests.

About plugin

  • Plugin page: wp-oauth-integration
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2018
  • Latest release: Jan 12, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: arbet01 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /844 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.16MB] [CPU: ▼21.38ms] Passed 4 tests

Server-side resources used by WP OAuth Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0027.94 ▼8.80
Dashboard /wp-admin3.21 ▼0.1433.18 ▼36.61
Posts /wp-admin/edit.php3.28 ▼0.0832.65 ▼12.20
Add New Post /wp-admin/post-new.php5.47 ▼0.4266.30 ▼27.90
Media Library /wp-admin/upload.php3.21 ▼0.0228.70 ▼1.78
Meetup Login /wp-admin/options-general.php?page=woi_meetup_settings3.1839.54

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP OAuth Integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.38 ▼0.141.65 ▼0.2943.81 ▼0.04
Dashboard /wp-admin2,199 ▲215.64 ▼0.2294.95 ▼16.3842.78 ▲0.04
Posts /wp-admin/edit.php2,104 ▲41.97 ▲0.0234.82 ▼2.0032.20 ▼4.60
Add New Post /wp-admin/post-new.php1,528 ▲223.57 ▼0.13640.59 ▼44.2748.06 ▼6.96
Media Library /wp-admin/upload.php1,404 ▲14.21 ▲0.0195.84 ▼3.2543.55 ▼1.33
Meetup Login /wp-admin/options-general.php?page=woi_meetup_settings9291.9922.5926.47

Uninstaller [IO: ▲0.08MB] [DB: ▲0.07MB] 25% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WP_OAuth_Integration_Main::uninstall() should not be called statically
  • The plugin did not uninstall correctly, leaving 14 files (0.08MB) in the plugin directory
    • (new file) includes/lib/class-wp-oauth-integration-settings.php
    • (new file) includes/lib/class-wp-oauth-integration-autoloader.php
    • (new file) LICENSE
    • (new file) includes/lib/class-wp-oauth-integration-client.php
    • (new file) includes/assets/img/oauth-button.png
    • (new file) includes/lib/class-wp-oauth-integration-mods.php
    • (new file) includes/class-wp-oauth-integration-main.php
    • (new file) includes/lib/class-wp-oauth-integration-factory.php
    • (new file) includes/lib/class-wp-oauth-integration-login.php
    • (new file) includes/helpers.php
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=woi_meetup_settings
    • > Notice in wp-content/plugins/wp-oauth-integration/includes/lib/class-wp-oauth-integration-mods.php+34
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-oauth-integration/wp-oauth-integration.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: oauth provider, oauth, oauth2 service, oauth2, oauth client...

wp-oauth-integration/wp-oauth-integration.php Passed 13 tests

The main PHP file in "WP OAuth Integration" ver. 0.1.3 adds more information about the plugin and also serves as the entry point for this plugin
68 characters long description:
Allow users to login/register via their different provider accounts.

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 plugin793 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10332385793

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.50
▷ Minimum class complexity2.00
▷ Maximum class complexity38.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods73
▷ Static methods2331.51%
▷ Public methods5676.71%
▷ Protected methods00.00%
▷ Private methods1723.29%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/assets/img/oauth-button.png3.83KB2.19KB▼ 42.82%