78% woocommerce-mws-sync

Code Review | WooCommerce MWS Sync

WordPress plugin WooCommerce MWS Sync scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-mws-sync
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: May 11, 2015
  • Latest release: Jul 28, 2020
  • Number of updates: 8
  • Update frequency: every 238.1 days
  • Top authors: ottok (62.5%)deployer (37.5%)seravo (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,635 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.33ms] Passed 4 tests

An overview of server-side resources used by WooCommerce MWS Sync
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.88 ▼1.92
Dashboard /wp-admin3.35 ▲0.0153.40 ▼9.39
Posts /wp-admin/edit.php3.40 ▲0.0445.68 ▼5.68
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.37 ▼23.13
Media Library /wp-admin/upload.php3.27 ▲0.0431.95 ▼3.10

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce MWS Sync
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.27 ▼0.081.95 ▲0.4943.95 ▲4.39
Dashboard /wp-admin2,198 ▲175.61 ▼0.1094.04 ▼2.0042.56 ▼4.62
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0434.84 ▼1.7634.36 ▼1.83
Add New Post /wp-admin/post-new.php1,535 ▼118.59 ▼6.37634.61 ▲46.0175.88 ▲2.81
Media Library /wp-admin/upload.php1,397 ▼34.15 ▼0.0596.62 ▼2.5442.37 ▲1.44

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Samples/CancelFeedSubmissionsSample.php
    • > /wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Samples/GetReportSample.php
    • > /wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Samples/RequestReportSample.php
    • > /wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Samples/GetFeedSubmissionCountSample.php
    • > /wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Samples/GetFeedSubmissionResultSample.php
  • 170× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetFeedSubmissionCountRequest.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetReportScheduleListByNextTokenResult.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetFeedSubmissionResultResult.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/UpdateReportAcknowledgementsResponse.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetReportRequestCountResult.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'MarketplaceWebService/Model.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/UpdateReportAcknowledgementsRequest.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'MarketplaceWebService/Model.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetFeedSubmissionCountRequest.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetReportRequestListResult.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/SubmitFeedResponse.php on line 22
    • > PHP Warning
      require_once(MarketplaceWebService/Model.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-mws-sync/api/src/MarketplaceWebService/Model/GetReportScheduleListResponse.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: sku, integration, amazon, sync, woocommerce...

woocommerce-mws-sync/woocommerce-mws-sync.php 92% from 13 tests

The principal PHP file in "WooCommerce MWS Sync" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.1" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected9,840 lines of code in 123 files:
LanguageFilesBlank linesComment linesLines of code
PHP1013,00111,9009,515
XML21025313
YAML14112

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.41
▷ Minimum class complexity1.00
▷ Maximum class complexity222.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes77
▷ Abstract classes11.30%
▷ Concrete classes7698.70%
▷ Final classes11.32%
Methods1,256
▷ Static methods221.75%
▷ Public methods1,20095.54%
▷ Protected methods20.16%
▷ Private methods544.30%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants1152.38%
▷ Class constants1047.62%
▷ Public constants10100.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
No PNG files were detected