10% multisite-sync-for-woocommerce

Code Review | Multisite sync for WooCommerce

WordPress plugin Multisite sync for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: multisite-sync-fo...
  • Plugin version: 3.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.8
  • WordPress version: 6.3.1
  • First release: Nov 18, 2020
  • Latest release: Apr 8, 2022
  • Number of updates: 17
  • Update frequency: every 29.8 days
  • Top authors: Lemontec (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active / 2,726 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/multisite-sync-for-woocommerce/inc/inc-backend.php+9
    Uncaught Error: Call to undefined function get_sites() in wp-content/plugins/multisite-sync-for-woocommerce/inc/inc-backend.php:9
    Stack trace:
    #0 wp-content/plugins/multisite-sync-for-woocommerce/inc/inc-backend.php(32): multisite_sync_for_woocommerce_json_fileds()
    #1 wp-content/plugins/multisite-sync-for-woocommerce/inc/inc-backend.php(136): multisite_sync_for_woocommerce->__construct()
    #2 wp-content/plugins/multisite-sync-for-woocommerce/lemontec-woocommerce-multisite-sync.php(22): require_once('/var/www/wordpr...')
    #3 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #4 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.32ms] Passed 4 tests

A check of server-side resources used by Multisite sync for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.03 ▲3.22
Dashboard /wp-admin3.31 ▲0.0059.65 ▲13.95
Posts /wp-admin/edit.php3.36 ▲0.0052.59 ▲3.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.82 ▼2.01
Media Library /wp-admin/upload.php3.23 ▲0.0036.04 ▲0.43

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Multisite sync for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼1114.80 ▼0.001.95 ▼0.0157.51 ▲12.76
Dashboard /wp-admin2,203 ▼34.86 ▼1.02132.36 ▲35.3653.21 ▲13.79
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0338.86 ▼0.0735.56 ▲1.28
Add New Post /wp-admin/post-new.php1,533 ▼923.35 ▲5.21669.81 ▲33.6562.37 ▲2.55
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.01114.05 ▲12.6955.57 ▲9.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-sync-for-woocommerce/lemontec-woocommerce-multisite-sync.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/multisite-sync-for-woocommerce/trunk/inc/inc-backend.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/multisite-sync-for-woocommerce/trunk/lemontec-woocommerce-multisite-sync.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/multisite-sync-for-woocommerce/inc/inc-backend.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

multisite-sync-for-woocommerce/lemontec-woocommerce-multisite-sync.php 85% from 13 tests

The main file in "Multisite sync for WooCommerce" v. 3.4.4 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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multisite-sync-for-woocommerce.php" instead of "lemontec-woocommerce-multisite-sync.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "2.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected703 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310879570
PO File24040132
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1050.00%
▷ Protected methods00.00%
▷ Private methods1050.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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