78% opal-social-login

Code Review | OPAL SOCIAL LOGIN

WordPress plugin OPAL SOCIAL LOGIN scored78%from 54 tests.

About plugin

  • Plugin page: opal-social-login
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 12, 2018
  • Latest release: Dec 21, 2018
  • Number of updates: 4
  • Update frequency: every 2.5 days
  • Top authors: wpopal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.55ms] Passed 4 tests

Server-side resources used by OPAL SOCIAL LOGIN
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.02 ▲0.11
Dashboard /wp-admin3.45 ▲0.1447.29 ▲0.26
Posts /wp-admin/edit.php3.50 ▲0.1451.40 ▲9.15
Add New Post /wp-admin/post-new.php5.96 ▲0.0779.03 ▼9.81
Media Library /wp-admin/upload.php3.28 ▲0.0637.28 ▼0.74
Opal Social Login /wp-admin/options-general.php?page=opal-social-login3.3031.46

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 119 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for OPAL SOCIAL LOGIN
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲19414.63 ▲0.101.79 ▲0.1941.89 ▲3.77
Dashboard /wp-admin2,354 ▲1806.39 ▲0.86108.97 ▲25.5338.02 ▼4.19
Posts /wp-admin/edit.php2,288 ▲1883.52 ▲1.5456.89 ▲22.3636.57 ▲1.73
Add New Post /wp-admin/post-new.php1,703 ▲17722.59 ▼0.94645.09 ▲5.9230.70 ▼19.72
Media Library /wp-admin/upload.php1,428 ▲314.33 ▲0.0984.64 ▼29.4245.99 ▼0.83
Opal Social Login /wp-admin/options-general.php?page=opal-social-login1,3213.2744.7771.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=opal-social-login
    • > Notice in wp-content/plugins/opal-social-login/includes/admin/metabox/class-metabox.php+381
    Undefined variable: hidden_val

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
  • 70× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OpenID' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Provider/AOLOpenID.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Provider/Instagram.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Provider/Spotify.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Provider/Disqus.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Provider/Google.php:48
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/opal-social-login/templates/social-icons-default.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WSL_METABOX_SETTINGS' not found in wp-content/plugins/opal-social-login/includes/admin/metabox/class-extends.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Exception\\UnexpectedValueException' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Exception/HttpClientFailureException.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\AbstractAdapter' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Adapter/OAuth2.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Exception\\BadMethodCallException' not found in wp-content/plugins/opal-social-login/includes/hybridauth/Exception/NotImplementedException.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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: facebook, google, social login, twitter

opal-social-login/plugin-core.php 92% from 13 tests

Analyzing the main PHP file in "OPAL SOCIAL LOGIN" version 1.0.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("opal-social-login.php" instead of "plugin-core.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected6,103 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
PHP981,9054,4145,852
CSS220167
JavaScript115965
Markdown310018
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.95
▷ Minimum class complexity1.00
▷ Maximum class complexity191.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces11
Interfaces5
Traits1
Classes85
▷ Abstract classes67.06%
▷ Concrete classes7992.94%
▷ Final classes56.33%
Methods383
▷ Static methods174.44%
▷ Public methods28073.11%
▷ Protected methods9023.50%
▷ Private methods133.39%
Functions19
▷ Named functions1684.21%
▷ Anonymous functions315.79%
Constants15
▷ Global constants1173.33%
▷ Class constants426.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/twitter.png2.01KB1.19KB▼ 40.88%
assets/images/New folder/google.png15.80KB1.25KB▼ 92.08%
assets/images/opal-logo.png15.71KB2.01KB▼ 87.20%
assets/images/New folder/facebook.png1.16KB0.42KB▼ 63.83%
assets/images/google.png2.22KB1.46KB▼ 34.42%