10% global-seller-services-for-woocommerce

Code Review | Global Seller Services for WooCommerce

WordPress plugin Global Seller Services for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: global-seller-ser...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Jul 2, 2021
  • Latest release: May 24, 2022
  • Number of updates: 9
  • Update frequency: every 36.3 days
  • Top authors: digitalriverwordpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,223 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/global-seller-services-for-woocommerce/src/Installer.php+32
    Uncaught Error: Call to a member function add_cap() on null in wp-content/plugins/global-seller-services-for-woocommerce/src/Installer.php:32
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): DigitalRiver\WooCommerce\Installer::activation()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.67ms] Passed 4 tests

This is a short check of server-side resources used by Global Seller Services for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.75 ▼4.94
Dashboard /wp-admin3.31 ▼0.0441.57 ▼17.25
Posts /wp-admin/edit.php3.36 ▲0.0040.07 ▼6.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.99 ▼10.18
Media Library /wp-admin/upload.php3.23 ▲0.0037.72 ▲2.39

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Global Seller Services for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.45 ▲0.161.64 ▲0.1142.96 ▲3.68
Dashboard /wp-admin2,198 ▲185.58 ▼0.0583.46 ▼5.7736.19 ▼2.90
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0336.12 ▼0.6129.97 ▼1.62
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▲0.83615.21 ▼28.2447.93 ▼24.87
Media Library /wp-admin/upload.php1,400 ▼04.22 ▼0.0197.76 ▼3.8342.44 ▼2.36

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • dr_flush_rewrite_rules_flag
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/global-seller-services-for-woocommerce/templates/Checkout/taxIdentifier-section.php
  • 476× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DigitalRiver\\ApiSdk\\Model\\ModelInterface' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/digitalriver/digital-river-php/lib/Model/ListCountrySpecsResponse.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php:20
    • > PHP Parse error
      syntax error, unexpected '|', expecting '{' in wp-content/plugins/global-seller-services-for-woocommerce/vendor/symfony/polyfill-intl-idn/bootstrap80.php on line 121
    • > PHP Fatal error
      Uncaught Error: Interface 'DigitalRiver\\WooCommerce\\Interfaces\\DRHandlers\\Order' not found in wp-content/plugins/global-seller-services-for-woocommerce/src/DRHandlers/Order.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'DigitalRiver\\ApiSdk\\Model\\ModelInterface' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/digitalriver/digital-river-php/lib/Model/ReservationRequest.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'DigitalRiver\\ApiSdk\\Model\\ModelInterface' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/digitalriver/digital-river-php/lib/Model/TaxCertificate.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'DigitalRiver\\ApiSdk\\Model\\ModelInterface' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/digitalriver/digital-river-php/lib/Model/CheckoutRequest.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'DigitalRiver\\ApiSdk\\Model\\ModelInterface' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/digitalriver/digital-river-php/lib/Model/RefundItem.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/global-seller-services-for-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: These screenshots do not have images: #1 (Payment settings), #2 (Plugin configuration settings)
You can take inspiration from this readme.txt

global-seller-services-for-woocommerce/digitalriver.php 77% from 13 tests

The principal PHP file in "Global Seller Services for WooCommerce" v. 1.1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("global-seller-services-for-woocommerce.php" instead of "digitalriver.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.4.0" instead of "5.4.2")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin178,523 lines of code in 813 files:
LanguageFilesBlank linesComment linesLines of code
PHP69223,69478,491139,354
JSON193030,674
Markdown211,48904,332
JavaScript618018253,530
Sass2440209
YAML9385167
reStructuredText19613997
XML313576
CSS315665
Dockerfile18010
make1409

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity22.81
▷ Minimum class complexity1.00
▷ Maximum class complexity587.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces85
Interfaces56
Traits11
Classes568
▷ Abstract classes101.76%
▷ Concrete classes55898.24%
▷ Final classes295.20%
Methods8,824
▷ Static methods1,25914.27%
▷ Public methods8,28193.85%
▷ Protected methods3033.43%
▷ Private methods2402.72%
Functions716
▷ Named functions9913.83%
▷ Anonymous functions61786.17%
Constants770
▷ Global constants769.87%
▷ Class constants69490.13%
▷ Public constants67296.83%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin