77% myworks-woo-sync-for-quickbooks-online

Code Review | WooCommerce Sync for QuickBooks Online - by MyWorks Software

WordPress plugin WooCommerce Sync for QuickBooks Online - by MyWorks Software scored77%from 54 tests.

About plugin

  • Plugin page: myworks-woo-sync-...
  • Plugin version: 2.8.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2018
  • Latest release: Aug 22, 2023
  • Number of updates: 87
  • Update frequency: every 20.8 days
  • Top authors: myworksdesign (100%)

Code review

54 tests

User reviews

72 reviews

Install metrics

6,000+ active /99,372 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.00MB] [CPU: ▼7.65ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Sync for QuickBooks Online - by MyWorks Software
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.29 ▼6.69
Dashboard /wp-admin3.31 ▲0.0045.84 ▼8.17
Posts /wp-admin/edit.php3.36 ▲0.0052.12 ▲7.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.72 ▼16.32
Media Library /wp-admin/upload.php3.23 ▲0.0036.59 ▲0.57

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 830 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
mw_wc_qbo_sync_qbo_is_connected
widget_recent-comments
mw_wc_qbo_sync_customer_qbo_check
widget_theysaidso_widget
widget_recent-posts
mw_wc_qbo_sync_ord_sa_new_pr_pg_fnct
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Sync for QuickBooks Online - by MyWorks Software
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.351.80 ▼0.0743.32 ▲0.08
Dashboard /wp-admin2,198 ▲185.60 ▼0.0691.13 ▲2.5240.43 ▲5.70
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0139.26 ▼1.8935.03 ▼4.48
Add New Post /wp-admin/post-new.php1,526 ▼923.75 ▲5.54696.24 ▲85.7851.36 ▼24.33
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.03105.54 ▲1.1047.67 ▲2.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • mw_wc_qbo_sync_ord_sa_new_pr_pg_fnct
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/admin/partials/myworks-wc-qbo-sync-admin-map-custom-fields-new.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/admin/partials/myworks-wc-qbo-sync-init-new.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/admin/partials/myworks-wc-qbo-sync-admin-connection-latest.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/cron/deposit-cron.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/cron/inventory-cron.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/admin/partials/myworks-wc-qbo-sync-admin-pull-dashboard.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/admin/partials/myworks-wc-qbo-sync-db-fix.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/cron/all-cron.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/SSL.php
    • > /wp-content/plugins/myworks-woo-sync-for-quickbooks-online/admin/partials/myworks-wc-qbo-sync-admin-push-dashboard.php
  • 696× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'QuickBooks_Loader' not found in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/Callbacks/API/Callbacks.php:25
    • > PHP Warning
      require_once(QuickBooks.php): failed to open stream: No such file or directory in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/QBXML/Schema/Object/ReceivePaymentAddRq.php on line 16
    • > PHP Warning
      require_once(QuickBooks.php): failed to open stream: No such file or directory in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/QBXML/Schema/Object/InvoiceModRq.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'QuickBooks_Loader' not found in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/Encryption/Rc4.php:15
    • > PHP Warning
      require_once(QuickBooks.php): failed to open stream: No such file or directory in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/QBXML/Schema/Object/tmp/CustomerModRq.php on line 16
    • > PHP Warning
      require_once(QuickBooks.php): failed to open stream: No such file or directory in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/QBXML/Schema/Object/CustomerMsgQueryRq.php on line 16
    • > PHP Warning
      require_once(QuickBooks.php): failed to open stream: No such file or directory in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/QBXML/Schema/Object/ClassQueryRq.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'QuickBooks_Loader' not found in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/Status/Report.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'QuickBooks_Loader' not found in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/IPP/Object/Line.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'QuickBooks.php' (include_path='.:/usr/share/php') in wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib/QuickBooks/QBXML/Schema/Object/InvoiceModRq.php on line 16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: quickbooks, quickbooks online, woocommerce quickbooks, woocommerce sync, woocommerce...

myworks-woo-sync-for-quickbooks-online/myworks-woo-sync-for-quickbooks-online.php 77% from 13 tests

The entry point to "WooCommerce Sync for QuickBooks Online - by MyWorks Software" version 2.8.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.3" instead of "5.2")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 267 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin155,918 lines of code in 688 files:
LanguageFilesBlank linesComment linesLines of code
PHP66226,60736,341136,446
CSS131,93982815,358
SVG4002,674
JavaScript4262267924
XML1114297
Markdown2890156
Maven15041
JSON11022

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,975)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 243)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.39
▷ Minimum class complexity1.00
▷ Maximum class complexity3,975.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity243.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes571
▷ Abstract classes91.58%
▷ Concrete classes56298.42%
▷ Final classes00.00%
Methods6,017
▷ Static methods65610.90%
▷ Public methods4,23570.38%
▷ Protected methods1,75829.22%
▷ Private methods240.40%
Functions63
▷ Named functions5485.71%
▷ Anonymous functions914.29%
Constants976
▷ Global constants68269.88%
▷ Class constants29430.12%
▷ Public constants294100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
97 PNG files occupy 1.76MB with 1.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/image/connect-icon.png2.42KB0.89KB▼ 63.11%
admin/image/7-h.png2.95KB0.19KB▼ 93.47%
admin/image/home-h.png49.30KB0.29KB▼ 99.42%
admin/image/5-h.png2.96KB0.26KB▼ 91.21%
admin/image/8.png74.49KB0.24KB▼ 99.68%