84% katalys-shop

Code Review | Katalys Merchant Sales Bridge

WordPress plugin Katalys Merchant Sales Bridge scored84%from 54 tests.

About plugin

  • Plugin page: katalys-shop
  • Plugin version: 1.1.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 6, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 21
  • Update frequency: every 19.1 days
  • Top authors: katalysdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.12MB] [CPU: ▲3.71ms] Passed 4 tests

Server-side resources used by Katalys Merchant Sales Bridge
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.1445.99 ▲4.39
Dashboard /wp-admin4.45 ▲1.1548.51 ▼3.06
Posts /wp-admin/edit.php4.50 ▲1.1555.04 ▲4.81
Add New Post /wp-admin/post-new.php6.98 ▲1.09102.75 ▲8.70
Media Library /wp-admin/upload.php4.31 ▲1.0845.32 ▲14.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Katalys Merchant Sales Bridge
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.23 ▼0.481.72 ▲0.0741.11 ▼10.08
Dashboard /wp-admin2,217 ▲435.74 ▲0.0988.72 ▼7.9476.09 ▲28.50
Posts /wp-admin/edit.php2,134 ▲341.97 ▲0.0239.14 ▲3.1033.83 ▼5.12
Add New Post /wp-admin/post-new.php1,587 ▲6123.60 ▲0.66719.41 ▲55.5741.09 ▼15.32
Media Library /wp-admin/upload.php1,431 ▲314.11 ▼0.09105.65 ▼4.4167.94 ▲21.60

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 195× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Constant SODIUM_CRYPTO_KDF_CONTEXTBYTES already defined in wp-content/plugins/katalys-shop/vendor/paragonie/sodium_compat/lib/php72compat_const.php on line 38
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE\\ConstantTime\\Base64' not found in wp-content/plugins/katalys-shop/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php:34
    • > PHP Fatal error
      Uncaught Error: Interface 'ParagonIE\\Paseto\\ValidationRuleInterface' not found in wp-content/plugins/katalys-shop/vendor/paragonie/paseto/src/Rules/IdentifiedBy.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'ParagonIE\\Paseto\\ValidationRuleInterface' not found in wp-content/plugins/katalys-shop/vendor/paragonie/paseto/src/Rules/IssuedBy.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Util' not found in wp-content/plugins/katalys-shop/vendor/paragonie/sodium_compat/src/Core32/Util.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519_Fe' not found in wp-content/plugins/katalys-shop/vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_SipHash' not found in wp-content/plugins/katalys-shop/vendor/paragonie/sodium_compat/namespaced/Core/SipHash.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE\\Paseto\\Exception\\PasetoException' not found in wp-content/plugins/katalys-shop/vendor/paragonie/paseto/src/Exception/EncodingException.php:9
    • > PHP Notice
      Constant SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX already defined in wp-content/plugins/katalys-shop/vendor/paragonie/sodium_compat/lib/php72compat_const.php on line 83
    • > PHP Notice
      Constant SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES already defined in wp-content/plugins/katalys-shop/vendor/paragonie/sodium_compat/lib/php72compat_const.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: shop, revoffers, embedded commerce, ecommerce, affiliate...

katalys-shop/katalys-shop.php Passed 13 tests

Analyzing the main PHP file in "Katalys Merchant Sales Bridge" version 1.1.15
95 characters long description:
Merchant bridge to allow automatic order fulfillment within Katalys + 1o Shop cart connections.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin49,226 lines of code in 201 files:
LanguageFilesBlank linesComment linesLines of code
PHP1896,88026,12748,453
JSON800750
SVG10117
Bourne Shell1203
CSS1113
JavaScript1010

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity33.83
▷ Minimum class complexity1.00
▷ Maximum class complexity634.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces28
Interfaces6
Traits1
Classes162
▷ Abstract classes3219.75%
▷ Concrete classes13080.25%
▷ Final classes43.08%
Methods1,650
▷ Static methods69542.12%
▷ Public methods1,57795.58%
▷ Protected methods613.70%
▷ Private methods120.73%
Functions201
▷ Named functions18491.54%
▷ Anonymous functions178.46%
Constants540
▷ Global constants346.30%
▷ Class constants50693.70%
▷ Public constants506100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected