84% sksoftware-postone-for-woocommerce

Code Review | SKSoftware Postone for WooCommerce

WordPress plugin SKSoftware Postone for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: sksoftware-poston...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Oct 17, 2021
  • Latest release: Nov 1, 2023
  • Number of updates: 19
  • Update frequency: every 39.7 days
  • Top authors: sksoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼9.38ms] Passed 4 tests

Analyzing server-side resources used by SKSoftware Postone for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3336.12 ▼4.83
Dashboard /wp-admin3.65 ▲0.3048.04 ▼18.52
Posts /wp-admin/edit.php3.70 ▲0.3450.52 ▼13.63
Add New Post /wp-admin/post-new.php6.18 ▲0.2996.47 ▼0.52
Media Library /wp-admin/upload.php3.51 ▲0.2739.69 ▲1.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SKSoftware Postone for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.54 ▼0.819.46 ▲7.8336.11 ▼7.51
Dashboard /wp-admin2,204 ▲245.66 ▲0.0089.00 ▼10.5441.52 ▲0.17
Posts /wp-admin/edit.php2,115 ▲102.01 ▲0.0141.17 ▲1.6237.11 ▲1.55
Add New Post /wp-admin/post-new.php1,538 ▲1222.93 ▼0.10656.43 ▼24.8749.99 ▼3.41
Media Library /wp-admin/upload.php1,412 ▲184.19 ▼0.00105.68 ▲3.2744.55 ▼0.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/settings_table_row_html.php on line 5
    • > PHP Notice
      Undefined variable: key in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/meta_box_form_field.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/meta_box_output.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/settings_table_html.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/settings_table_decimal_html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/meta_box_form_field.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/settings_table_select_html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/settings_table_row_html.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/sksoftware-postone-for-woocommerce/includes/class-sksoftware-postone-for-woocommerce-shipping-method.php:21
    • > PHP Notice
      Undefined variable: key in wp-content/plugins/sksoftware-postone-for-woocommerce/admin/partials/meta_box_form_field.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: postone shipping, postone, woocommerce, shipping

sksoftware-postone-for-woocommerce/sksoftware-postone-for-woocommerce.php Passed 13 tests

The main PHP file in "SKSoftware Postone for WooCommerce" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
This plugin integrates PostOne shipping method for WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,388 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP254581,0891,985
CSS2347208
JavaScript63311195

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods90
▷ Static methods22.22%
▷ Public methods6673.33%
▷ Protected methods00.00%
▷ Private methods2426.67%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants4100.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 images were found in this plugin