78% multistripe-by-keys

Code Review | Multi Stripe by Keys

WordPress plugin Multi Stripe by Keys scored78%from 54 tests.

About plugin

  • Plugin page: multistripe-by-keys
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 6.3.1
  • First release: Apr 4, 2022
  • Latest release: Apr 4, 2022
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: webfresk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /844 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
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.45ms] Passed 4 tests

Server-side resources used by Multi Stripe by Keys
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.94 ▲0.47
Dashboard /wp-admin3.40 ▲0.0654.73 ▼11.76
Posts /wp-admin/edit.php3.45 ▲0.1051.72 ▲3.02
Add New Post /wp-admin/post-new.php6.00 ▲0.1295.76 ▲0.26
Media Library /wp-admin/upload.php3.32 ▲0.1039.09 ▲1.25
General /wp-admin/admin.php?page=msbk_admin3.3336.37
Vendors /wp-admin/admin.php?page=msbk_vendors3.3234.24

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 10 new options
New WordPress options
recovery_mode_email_last_sent
widget_recent-comments
db_upgraded
can_compress_scripts
list_products_selected
vendors_ids
number_vendor_option
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Multi Stripe by Keys
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.53 ▼1.021.91 ▲0.0639.36 ▼7.13
Dashboard /wp-admin2,236 ▲485.13 ▲0.26113.93 ▼7.7042.38 ▼6.63
Posts /wp-admin/edit.php2,125 ▲362.29 ▲0.2938.53 ▼5.2634.38 ▼0.33
Add New Post /wp-admin/post-new.php1,542 ▲2323.24 ▲0.09592.94 ▼27.2758.66 ▲10.56
Media Library /wp-admin/upload.php1,424 ▲334.35 ▲0.1697.10 ▼7.9343.01 ▼2.44
General /wp-admin/admin.php?page=msbk_admin8791.9327.8129.70
Vendors /wp-admin/admin.php?page=msbk_vendors8491.9720.8732.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 10 options in the database
    • vendors_ids
    • list_products_selected
    • number_vendor_option
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=msbk_vendors
    • > Error in wp-content/plugins/multistripe-by-keys/Includes/Api/Callbacks/VendorCallbacks.php+77
    Uncaught Error: Call to undefined function Includes\Api\Callbacks\wc_get_products() in wp-content/plugins/multistripe-by-keys/Includes/Api/Callbacks/VendorCallbacks.php:77
    Stack trace:
    #0 wp-content/plugins/multistripe-by-keys/Includes/Api/Callbacks/VendorCallbacks.php(55): Includes\Api\Callbacks\VendorCallbacks->getListProducts()
    #1 wp-admin/includes/template.php(1824): Includes\Api\Callbacks\VendorCallbacks->vendorSelectCallback()
    #2 wp-admin/includes/template.php(1778): do_settings_fields()
    #3 wp-content/plugins/multistripe-by-keys/templates/msbk-admin-vendors.php(19): do_settings_sections()
    #4 wp-content/plugins/multistripe-by-keys/Includes/Api/Callbacks/AdminCallbacks.php(18): include_once('/var/www/wordpr...')
    #5 wp-includes/class-wp-hook.php(310): Includes\Api\Callbacks\AdminCallbacks->adminVendors()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/multistripe-by-keys/templates/msbk-admin-navbar.php:19
    • > PHP Notice
      Undefined index: page in wp-content/plugins/multistripe-by-keys/templates/msbk-admin-navbar.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/multistripe-by-keys/templates/msbk-admin-general.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/multistripe-by-keys/templates/msbk-admin-vendors.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: api, vendor, e-commerce, shop, payments...

multistripe-by-keys/multistripe-by-keys.php 92% from 13 tests

The entry point to "Multi Stripe by Keys" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,234 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP252543781,214
JSON10013
JavaScript2016
CSS1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.27
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods77
▷ Static methods1012.99%
▷ Public methods7394.81%
▷ Protected methods00.00%
▷ Private methods45.19%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin