67% ecommerce-social-login-social-sharing-by-miniorange

Code Review | Ecommerce Social Login (Apple, Kakao, Line)

WordPress plugin Ecommerce Social Login (Apple, Kakao, Line) scored 67% from 54 tests.

About plugin

  • Plugin page: ecommerce-social-...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-5.7
  • WordPress version: 5.9.2
  • First release: May 20, 2020
  • Latest release: Jun 1, 2021
  • Number of updates: 16
  • Update frequency: every 23.6 days
  • Top authors: cyberlord92 (87.5%)unsolvedcontriver (18.75%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 4,404 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲2.61MB] [CPU: ▼287.90ms] Passed 4 tests

Analyzing server-side resources used by Ecommerce Social Login (Apple, Kakao, Line)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.12 ▲2.6065.79 ▲14.14
Dashboard /wp-admin5.99 ▲2.5847.56 ▲7.33
Posts /wp-admin/edit.php6.26 ▲2.6253.77 ▲16.10
Add New Post /wp-admin/post-new.php9.84 ▲2.8793.37 ▼1,183.57
Media Library /wp-admin/upload.php5.95 ▲2.6533.92 ▲10.50
Social Commenting /wp-admin/admin.php?page=mo_wc_openid_social_commenting_settings5.9037.76
Add-On /wp-admin/admin.php?page=mo_wc_openid_settings_addOn5.9040.07
Social Login /wp-admin/admin.php?page=mo_wc_openid_general_settings6.2555.26
MailChimp Add-On /wp-admin/admin.php?page=mo_openid_mailchimp_add_on5.9041.73
Social Sharing /wp-admin/admin.php?page=mo_wc_openid_social_sharing_settings5.9446.37
BuddyPress Add-On /wp-admin/admin.php?page=mo_openid_buddypress_add_on5.9040.62
WooCommerce Add-On /wp-admin/admin.php?page=mo_openid_woocommerce_add_on5.9043.63
HubSpot Add-On /wp-admin/admin.php?page=mo_openid_hubspot_add_on5.9238.31

Server storage [IO: ▲5.34MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 220 new files
Database: 1 new table, 98 new options
New tables
wp_mo_openid_linked_user
New WordPress options
mo_manual_login_error_message
mo_login_icon_custom_width
mo_openid_share_theme
moopenid_social_login_avatar
custom_otp_msg
ecommerce_social_login__social_sharing
mo_openid_user_activation_date
mo_profile_complete_extra_instruction
mo_email_verify_wrong_otp
mo_openid_malform_error
...

Browser metrics Passed 4 tests

A check of browser resources used by Ecommerce Social Login (Apple, Kakao, Line)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,997 ▲24316.38 ▲0.7711.24 ▲5.311.99 ▼0.63
Dashboard /wp-admin2,945 ▲846.12 ▲0.03117.26 ▼17.95172.95 ▲8.58
Posts /wp-admin/edit.php2,755 ▲673.14 ▼0.2265.75 ▲2.22144.23 ▲1.14
Add New Post /wp-admin/post-new.php1,704 ▲4320.99 ▲4.65450.75 ▲43.11168.03 ▲7.55
Media Library /wp-admin/upload.php1,766 ▲685.52 ▼0.02125.37 ▼23.59207.83 ▲22.39
Social Commenting /wp-admin/admin.php?page=mo_wc_openid_social_commenting_settings3,3333.2880.2065.61
Add-On /wp-admin/admin.php?page=mo_wc_openid_settings_addOn4,50813.66340.5699.25
Social Login /wp-admin/admin.php?page=mo_wc_openid_general_settings5,2325.11118.43237.92
MailChimp Add-On /wp-admin/admin.php?page=mo_openid_mailchimp_add_on1,6373.7970.3653.22
Social Sharing /wp-admin/admin.php?page=mo_wc_openid_social_sharing_settings4,4254.80125.2675.17
BuddyPress Add-On /wp-admin/admin.php?page=mo_openid_buddypress_add_on2,73413.25306.3184.72
WooCommerce Add-On /wp-admin/admin.php?page=mo_openid_woocommerce_add_on2,69412.39298.1883.04
HubSpot Add-On /wp-admin/admin.php?page=mo_openid_hubspot_add_on2,3123.8971.6752.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mo_openid_linked_user
  • The uninstall procedure has failed, leaving 9 options in the database
    • mo_openid_amazon_enable
    • widget_mo_wc_openid_sharing_ver_wid
    • widget_mo_wc_openid_login_wid
    • widget_mo_wc_openid_sharing_hor_wid
    • mo_wc_check_notice
    • mo_openid_linkedin_enable
    • mo_openid_extension_tab
    • mo_openid_google_enable
    • mo_wc_openid_rateus_activate

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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
Almost there! Just fix the following items
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/soc_sha/soc_apps/mo_openid_sharing.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/class-mo-wc-openid-social-share.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/soc_sha/soc_apps/mo_openid_sharing.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/soc_sha/soc_apps/mo_openid_sharing.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/soc_sha/soc_apps/mo_openid_sharing.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/support_form/miniorange_openid_support_form.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/support_form/miniorange_openid_support_form.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/soc_sha/soc_apps/mo_openid_sharing.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/class-mo-wc-wcOpenid-login-widget.php:3
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/ecommerce-social-login-social-sharing-by-miniorange/view/support_form/miniorange_openid_support_form.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=mo_openid_mailchimp_add_on
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mo_openid_mailchimp_add_on 421:36 Uncaught TypeError: jQuery(...).intlTelInput is not a function
    • > GET request to /wp-admin/admin.php?page=mo_openid_buddypress_add_on
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mo_openid_buddypress_add_on 549:36 Uncaught TypeError: jQuery(...).intlTelInput is not a function
    • > GET request to /wp-admin/admin.php?page=mo_openid_woocommerce_add_on
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mo_openid_woocommerce_add_on 547:36 Uncaught TypeError: jQuery(...).intlTelInput is not a function
    • > GET request to /wp-admin/admin.php?page=mo_openid_hubspot_add_on
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mo_openid_hubspot_add_on 644:36 Uncaught TypeError: jQuery(...).intlTelInput is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Social Login apps setup preview.), #2 (Social Login icon customization and preview.), #3 (Social Login display Options.), #4 (Social Login redirection options.), #5 (Advanced options for Social Login.), #6 (WooCommerce display options and Integration.)
  • Tags: You are using too many tags: 18 tag instead of maximum 10
You can look at the official readme.txt

ecommerce-social-login-social-sharing-by-miniorange/miniorange_wc_openid_sso_settings.php 92% from 13 tests

This is the main PHP file of "Ecommerce Social Login (Apple, Kakao, Line)" version 1.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ecommerce-social-login-social-sharing-by-miniorange.php" instead of "miniorange_wc_openid_sso_settings.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin42,479 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
PHP951,61931615,883
JavaScript73,1372,11615,414
CSS103761445,355
PO File31,8462,2125,142
SVG100685

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 150)
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.45
▷ Minimum class complexity1.00
▷ Maximum class complexity229.00
Average method complexity7.56
▷ Minimum method complexity1.00
▷ Maximum method complexity150.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes00.00%
▷ Concrete classes49100.00%
▷ Final classes00.00%
Methods93
▷ Static methods44.30%
▷ Public methods9096.77%
▷ Protected methods00.00%
▷ Private methods33.23%
Functions135
▷ Named functions13297.78%
▷ Anonymous functions32.22%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
91 PNG files occupy 1.61MB with 0.83MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/icons/paypal.png48.75KB19.69KB▼ 59.61%
includes/images/mailchimp_logo.png14.53KB14.53KB0.00%
(invalid) includes/images/icons/stackexchange.png3.49KB0.00KB▼ 100.00%
includes/images/icons/tumblr.png1.76KB1.10KB▼ 37.45%
includes/images/dollar.png17.15KB6.91KB▼ 59.73%