10% kb-woocommerce-braspress

Code Review | Kayo Bruno - Braspress for WooCommerce

WordPress plugin Kayo Bruno - Braspress for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: kb-woocommerce-br...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.1
  • WordPress version: 6.3.1
  • First release: Sep 23, 2020
  • Latest release: May 28, 2021
  • Number of updates: 10
  • Update frequency: every 24.7 days
  • Top authors: kayo_bruno (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /1,093 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'activate_kb_woocommerce_braspress' not found or invalid function name

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.09ms] Passed 4 tests

This is a short check of server-side resources used by Kayo Bruno - Braspress for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.48 ▲0.91
Dashboard /wp-admin3.48 ▲0.1747.77 ▼5.75
Posts /wp-admin/edit.php3.53 ▲0.1753.20 ▼1.62
Add New Post /wp-admin/post-new.php6.02 ▲0.1384.69 ▼21.88
Media Library /wp-admin/upload.php3.34 ▲0.1138.23 ▲1.61

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Kayo Bruno - Braspress for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.69 ▲0.392.08 ▲0.3943.00 ▼5.94
Dashboard /wp-admin2,205 ▲255.73 ▲0.0585.76 ▼3.8539.87 ▼6.47
Posts /wp-admin/edit.php2,107 ▲72.06 ▲0.0640.95 ▲4.5935.20 ▲3.91
Add New Post /wp-admin/post-new.php1,532 ▼1317.71 ▼5.79705.82 ▲28.5254.15 ▼3.63
Media Library /wp-admin/upload.php1,398 ▼54.23 ▼0.0597.62 ▼7.5443.09 ▼1.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate_kb_woocommerce_braspress' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'KB_WooCommerce_Braspress_Shipping_Method' not found in wp-content/plugins/kb-woocommerce-braspress/includes/shipping/class-kb-woocommerce-braspress-road.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/kb-woocommerce-braspress/includes/abstracts/abstract-kb-woocommerce-braspress-shipping-method.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'KB_WooCommerce_Braspress_Shipping_Method' not found in wp-content/plugins/kb-woocommerce-braspress/includes/shipping/class-kb-woocommerce-braspress-road-fob.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'KB_WooCommerce_Braspress_Shipping_Method' not found in wp-content/plugins/kb-woocommerce-braspress/includes/shipping/class-kb-woocommerce-braspress-air-fob.php:3
    • > PHP Fatal error
      Trait 'KB_WooCommerce_Braspress_Functions' not found in wp-content/plugins/kb-woocommerce-braspress/includes/class-kb-woocommerce-braspress-api.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'KB_WooCommerce_Braspress_Shipping_Method' not found in wp-content/plugins/kb-woocommerce-braspress/includes/shipping/class-kb-woocommerce-braspress-air.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: delivery, braspress, shipping, woocommerce

kb-woocommerce-braspress/kb-woocommerce-braspress.php Passed 13 tests

This is the main PHP file of "Kayo Bruno - Braspress for WooCommerce" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
This is an unofficial Braspress plugin for shipping calculation

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,826 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP202496931,227
JavaScript48060487
PO File14513112
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.38
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces1
Traits1
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods103
▷ Static methods10.97%
▷ Public methods7471.84%
▷ Protected methods98.74%
▷ Private methods2019.42%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected