67% wp-woo-commerce-sync-for-g-sheet

Code Review | Wordpress WooCommerce Sync for Google Sheet

WordPress plugin Wordpress WooCommerce Sync for Google Sheet scored 67% from 54 tests.

About plugin

  • Plugin page: wp-woo-commerce-s...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.7-5.3.2
  • WordPress version: 5.9.2
  • First release: Jan 25, 2020
  • Latest release: Feb 5, 2020
  • Number of updates: 10
  • Update frequency: every 1.2 days
  • Top authors: h3technologies (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 2,142 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲4.34MB] [CPU: ▼264.64ms] Passed 4 tests

Analyzing server-side resources used by Wordpress WooCommerce Sync for Google Sheet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.20 ▲4.6875.39 ▲23.75
Dashboard /wp-admin8.21 ▲4.8194.40 ▲41.95
Posts /wp-admin/edit.php8.21 ▲4.5857.96 ▲19.34
Add New Post /wp-admin/post-new.php10.28 ▲3.31116.02 ▼1,131.95
Media Library /wp-admin/upload.php8.21 ▲4.9254.62 ▲30.30
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius8.2143.51

Server storage [IO: ▲7.97MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,016 new files
Database: 2 new tables, 4 new options
New tables
wp_gssp_sheet_track
wp_gssp_settings
New WordPress options
fs_active_plugins
fs_debug_mode
fs_gdpr
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress WooCommerce Sync for Google Sheet
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲7915.91 ▲0.325.96 ▲0.102.28 ▼0.30
Dashboard /wp-admin2,943 ▲896.19 ▲0.10119.58 ▼21.43201.95 ▲34.88
Posts /wp-admin/edit.php2,753 ▲693.11 ▼0.1565.64 ▼21.67210.30 ▲61.11
Add New Post /wp-admin/post-new.php1,678 ▲2320.60 ▲0.21410.74 ▼35.54173.59 ▲1.80
Media Library /wp-admin/upload.php1,763 ▲655.62 ▲0.06130.40 ▼9.38229.51 ▲38.39
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4492.5160.62155.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/freemius/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 4 options
    • fs_gdpr
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient/examples/multi-api.php
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient/examples/idtoken.php
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/freemius/templates/ajax-loader.php
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient/examples/index.php
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient/examples/url-shortener.php
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient/examples/simple-file-upload.php
    • > /wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient/examples/large-file-upload.php
  • 643× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Docs/SuggestedTableCellStyle.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Drive/DriveFileCapabilities.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Docs/CreateHeaderRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Drive/DriveCapabilities.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Docs/Link.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Docs/DocsList.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Collection' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Sheets/BatchGetValuesByDataFilterRequest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Docs/LinkedContentReference.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Model' not found in wp-content/plugins/wp-woo-commerce-sync-for-g-sheet/assets/vendor/google/apiclient-services/src/Google/Service/Sheets/CellFormat.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: google sheets, woo commerce, sync

wp-woo-commerce-sync-for-g-sheet/index.php 85% from 13 tests

The entry point to "Wordpress WooCommerce Sync for Google Sheet" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-woo-commerce-sync-for-g-sheet.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)

Code Analysis 95% from 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
Success! There were no dangerous files found in this plugin116,628 lines of code in 943 files:
LanguageFilesBlank linesComment linesLines of code
PHP84817,02152,42595,163
PO File126,9608,45515,240
Markdown291,30604,259
JSON17201,170
JavaScript74668246
CSS163023220
XML52842152
YAML6341142
make211031
INI1015

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,772)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.17
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces37
Interfaces29
Traits7
Classes755
▷ Abstract classes121.59%
▷ Concrete classes74398.41%
▷ Final classes50.67%
Methods7,057
▷ Static methods2793.95%
▷ Public methods6,30489.33%
▷ Protected methods1962.78%
▷ Private methods5577.89%
Functions345
▷ Named functions18453.33%
▷ Anonymous functions16146.67%
Constants452
▷ Global constants11725.88%
▷ Class constants33574.12%
▷ Public constants335100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/wp-woocommerce-to-g-sheet.png3.57KB1.11KB▼ 68.86%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/wp-smm.png9.16KB5.26KB▼ 42.58%