83% shopgate-connector

Code Review | Shopgate

WordPress plugin Shopgate scored83%from 54 tests.

About plugin

  • Plugin page: shopgate-connector
  • Plugin version: 2.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 13
  • Update frequency: every 6.1 days
  • Top authors: Shopgate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /988 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.10ms] Passed 4 tests

Analyzing server-side resources used by Shopgate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0629.62 ▼10.02
Dashboard /wp-admin3.33 ▲0.0249.49 ▼1.76
Posts /wp-admin/edit.php3.38 ▲0.0246.15 ▼6.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.20 ▼3.31
Media Library /wp-admin/upload.php3.25 ▲0.0232.99 ▼4.15

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 98 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Shopgate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼29614.20 ▼0.230.83 ▼0.8215.05 ▼28.24
Dashboard /wp-admin2,195 ▲185.62 ▲0.0390.76 ▼4.3040.53 ▼2.82
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0137.25 ▼1.2130.85 ▼7.19
Add New Post /wp-admin/post-new.php1,526 ▼322.90 ▼0.34607.82 ▼45.1463.79 ▲14.05
Media Library /wp-admin/upload.php1,397 ▼04.18 ▼0.07104.37 ▼6.1954.52 ▲13.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 46× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_AbstractExport' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/catalog/Property.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_Redirect_DeeplinkSuffixValue' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/redirect/DeeplinkSuffixValueUnset.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ShopgateObject' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/helper/redirect/MobileRedirect.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_AbstractExport' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/catalog/Relation.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_AbstractExport' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/catalog/Category.php:54
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_AbstractExport' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/catalog/Option.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_Redirect_DeeplinkSuffixValue' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/redirect/DeeplinkSuffixValueDisabled.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Shopgate_Model_AbstractExport' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/models/catalog/Price.php:54
    • > PHP Fatal error
      Uncaught Error: Interface 'Shopgate_Helper_Redirect_RedirectorInterface' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/helper/redirect/Redirector.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'ShopgateObject' not found in wp-content/plugins/shopgate-connector/vendor/shopgate/classes/apis.php:23

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: shopgate, mobile, apps, ios, iphone...

shopgate-connector/shopgate.php 77% from 13 tests

The main file in "Shopgate" v. 2.9.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("shopgate-connector.php" instead of "shopgate.php")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin11,782 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP663,5509,63611,556
HTML3212115
XML23944111

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity11.30
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces14
Traits0
Classes109
▷ Abstract classes98.26%
▷ Concrete classes10091.74%
▷ Final classes11.00%
Methods1,769
▷ Static methods422.37%
▷ Public methods1,60290.56%
▷ Protected methods1478.31%
▷ Private methods201.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants446
▷ Global constants153.36%
▷ Class constants43196.64%
▷ Public constants431100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin