77% social-sharing-by-miniorange

Code Review | Ecommerce Social Sharing(sharing Icons,share buttons)

WordPress plugin Ecommerce Social Sharing(sharing Icons,share buttons) scored 77% from 54 tests.

About plugin

  • Plugin page: social-sharing-by...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-5.7
  • WordPress version: 5.9.2
  • First release: Jun 22, 2020
  • Latest release: May 8, 2021
  • Number of updates: 11
  • Update frequency: every 29.1 days
  • Top authors: cyberlord92 (81.82%)unsolvedcontriver (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.25MB] [CPU: ▼289.45ms] Passed 4 tests

This is a short check of server-side resources used by Ecommerce Social Sharing(sharing Icons,share buttons)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.2659.76 ▲8.53
Dashboard /wp-admin4.64 ▲1.2342.91 ▲10.97
Posts /wp-admin/edit.php4.85 ▲1.2143.04 ▲5.81
Add New Post /wp-admin/post-new.php8.49 ▲1.5284.13 ▼1,176.40
Media Library /wp-admin/upload.php4.60 ▲1.3028.01 ▲4.26
Social Commenting /wp-admin/admin.php?page=mo_ss_openid_social_commenting_settings4.4930.24
Social Sharing /wp-admin/admin.php?page=mo_ss_openid_settings4.5432.94

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 123 new files
Database: no new tables, 44 new options
New WordPress options
mo_share_icon_custom_height
mo_share_options_home_page_position
mo_disqus_shortname
mo_openid_share_custom_theme
mo_openid_social_comment_disqus_label
mo_openid_social_comment_blogpost
mo_openid_follow_us_icon_custom_color
mo_openid_follow_us_icon_space
mo_share_options_static_pages_position
mo_openid_social_share_version
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ecommerce Social Sharing(sharing Icons,share buttons)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,927 ▲20516.40 ▲0.7411.12 ▲5.052.17 ▼0.30
Dashboard /wp-admin2,925 ▲676.23 ▲0.11116.06 ▼21.81174.91 ▲11.91
Posts /wp-admin/edit.php2,722 ▲313.13 ▼0.1262.96 ▼1.77137.48 ▼4.92
Add New Post /wp-admin/post-new.php1,683 ▲2216.09 ▼0.48405.41 ▲6.19189.21 ▲28.99
Media Library /wp-admin/upload.php1,714 ▲165.56 ▲0.08125.81 ▼11.31199.85 ▲13.80
Social Commenting /wp-admin/admin.php?page=mo_ss_openid_social_commenting_settings1,4372.6855.1666.01
Social Sharing /wp-admin/admin.php?page=mo_ss_openid_settings4,6613.97112.4286.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_mo_openid_sh_sharing_hor_wid
    • mo_openid_social_share_version
    • fo_share_app
    • mo_openid_follow_us_custom_theme
    • mo_openid_user_activation_date
    • mo_disqus_shortname
    • widget_mo_openid_sh_sharing_ver_wid
    • mo_openid_user_activation_date1
    • mo_openid_malform_error
    • mo_openid_follow_us_theme

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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 12× GET requests to PHP files have triggered server-side errors or warnings (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/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/social-sharing-by-miniorange/class-mo-openid-login-widget.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-sharing-by-miniorange/view/support_form/miniorange_openid_support_form.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/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/social-sharing-by-miniorange/class-mo-openid-social-share.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/social-sharing-by-miniorange/miniorange_openid_sso_settings.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/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/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/social-sharing-by-miniorange/view/support_form/miniorange_openid_support_form.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/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 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=mo_ss_openid_social_commenting_settings
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=mo_ss_openid_social_commenting_settings 394:36 Uncaught TypeError: jQuery(...).intlTelInput is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 20 tag instead of maximum 10
The official readme.txt is a good inspiration

social-sharing-by-miniorange/miniorange_openid_sso_settings.php 92% from 13 tests

The main PHP script in "Ecommerce Social Sharing(sharing Icons,share buttons)" version 1.0.6 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("social-sharing-by-miniorange.php" instead of "miniorange_openid_sso_settings.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin21,105 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,1951186,481
CSS105591986,110
PO File31,8462,2125,142
JavaScript7207792,687
SVG100685

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 115)
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity44.50
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity5.58
▷ Minimum method complexity1.00
▷ Maximum method complexity115.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions5296.30%
▷ Anonymous functions23.70%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
56 PNG files occupy 0.67MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/dollar.png17.15KB6.91KB▼ 59.73%
includes/images/icons/share_icons/facebook_like.png2.89KB1.61KB▼ 44.10%
includes/images/icons/vkontakte.png1.02KB0.76KB▼ 25.84%
includes/images/icons/share_icons/facebook_recommend.png1.95KB1.60KB▼ 17.77%
includes/images/icons/twitters.png13.31KB14.09KB0.00%