78% order-sync-with-google-sheets-for-woocommerce

Code Review | Order Sync with Google Sheets for WooCommerce

WordPress plugin Order Sync with Google Sheets for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: order-sync-with-g...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Mar 6, 2023
  • Latest release: Nov 29, 2023
  • Number of updates: 30
  • Update frequency: every 9.1 days
  • Top authors: ordersyncplugin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,337 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.77MB] [CPU: ▲14.86ms] Passed 4 tests

This is a short check of server-side resources used by Order Sync with Google Sheets for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7560.28 ▲16.18
Dashboard /wp-admin4.10 ▲0.7669.21 ▲5.35
Posts /wp-admin/edit.php4.14 ▲0.7877.84 ▲28.44
Add New Post /wp-admin/post-new.php6.66 ▲0.77109.44 ▲9.45
Media Library /wp-admin/upload.php4.02 ▲0.7962.79 ▲32.10

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 134 new files
Database: no new tables, 42 new options
New WordPress options
widget_recent-posts
osgsw_order_total
theysaidso_admin_options
osgsw_update_notice
osgsw_freeze_headers
db_upgraded
osgsw_sheet_tab
osgsw_spreadsheet_url
osgsw_show_order_date
osgsw_sync_order_id
...

Browser metrics Passed 4 tests

Checking browser requirements for Order Sync with Google Sheets for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,125 ▲36314.21 ▼0.492.07 ▲0.4540.90 ▼3.12
Dashboard /wp-admin2,518 ▲3415.69 ▲0.02129.70 ▲31.9381.07 ▲35.44
Posts /wp-admin/edit.php2,332 ▲2322.81 ▲0.7865.16 ▲27.9835.21 ▲1.19
Add New Post /wp-admin/post-new.php1,679 ▲15322.98 ▲0.04683.56 ▲55.4449.74 ▲2.00
Media Library /wp-admin/upload.php1,544 ▲1444.23 ▲0.05102.85 ▲4.3663.63 ▲22.38

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 41 options
    • osgsw_free_active
    • osgsw_redirect_to_admin_page
    • osgsw_sync_total_price
    • osgsw_show_order_url
    • osgsw_sync_total_items
    • osgsw_setup_step
    • osgsw_sync_order_products
    • osgsw_credential_file
    • osgsw_sheet_id
    • osgsw_update_notice
    • ...

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

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 12× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/classes/class-base.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/classes/class-hooks.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/boot.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/order-sync-with-google-sheets-for-woocommerce.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/models/class-column.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/models/class-sheet.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/classes/class-install.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/classes/class-app.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/models/class-order.php
    • > /wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/includes/classes/class-ajax.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/order-sync-with-google-sheets-for-woocommerce/templates/promo.php:16

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 93% from 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
8 plugin tags: order sync, sales, order manager, ecommerce, inventory management...

order-sync-with-google-sheets-for-woocommerce/order-sync-with-google-sheets-for-woocommerce.php 85% from 13 tests

The main file in "Order Sync with Google Sheets for WooCommerce" v. 1.5.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 150 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin8,749 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP368912,1445,508
SVG302501,156
CSS310513979
JavaScript49092641
Markdown21460444
JSON10021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity30.94
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes750.00%
Methods235
▷ Static methods83.40%
▷ Public methods19984.68%
▷ Protected methods83.40%
▷ Private methods2811.91%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
Constants15
▷ Global constants15100.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
20 compressed PNG files occupy 1.40MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/tooltip/step4_copy-code.png5.90KB6.44KB0.00%
public/images/trofi.png10.56KB4.61KB▼ 56.35%
public/images/thumbnails/5.Sheet URL & trigger 4.png129.67KB143.36KB0.00%
public/images/tooltip/step4_appscript.png8.75KB8.92KB0.00%
public/images/tooltip/step4_click-on-addTrigger-button.png3.38KB3.86KB0.00%