78% woo-epos-now-integration

Code Review | Integration for Epos Now and WooCommerce

WordPress plugin Integration for Epos Now and WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: woo-epos-now-inte...
  • Plugin version: 4.2.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Nov 10, 2023
  • Number of updates: 129
  • Update frequency: every 13.7 days
  • Top authors: slynkdigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /13,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.07ms] Passed 4 tests

Analyzing server-side resources used by Integration for Epos Now and WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.86 ▼7.50
Dashboard /wp-admin3.31 ▼0.0344.99 ▼14.57
Posts /wp-admin/edit.php3.36 ▲0.0147.58 ▲2.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.05 ▼3.35
Media Library /wp-admin/upload.php3.23 ▲0.0031.83 ▼2.87
EposNow /wp-admin/admin.php?page=sew-settings3.0121.98
Logs /wp-admin/admin.php?page=slynk-epn-wc-logs3.0124.31

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 12 new options
New WordPress options
can_compress_scripts
sew_cron_interval
sew_product_webhook_delay
widget_recent-posts
db_upgraded
sew_disable_refund_order_sync
widget_theysaidso_widget
sew_log_all_api_requests
widget_recent-comments
slynk_ew_plugin_version
...

Browser metrics Passed 4 tests

An overview of browser requirements for Integration for Epos Now and WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.21 ▼0.151.95 ▲0.2538.03 ▼7.99
Dashboard /wp-admin2,198 ▲175.62 ▼0.0491.56 ▼24.0341.23 ▼5.43
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0540.95 ▲5.2135.99 ▼1.80
Add New Post /wp-admin/post-new.php1,534 ▲825.12 ▲1.52618.03 ▼76.9863.63 ▲7.68
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0298.08 ▼12.0940.77 ▼8.55
EposNow /wp-admin/admin.php?page=sew-settings280.410.084.28
Logs /wp-admin/admin.php?page=slynk-epn-wc-logs280.410.084.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 12 options
    • sew_log_all_api_requests
    • widget_recent-comments
    • slynk_ew_plugin_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • sew_disable_refund_order_sync
    • can_compress_scripts
    • sew_product_sync_disabled
    • ...

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 50% 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
Almost there! Just fix the following items
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-epos-now-integration/inc/activation.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-epos-now-integration/inc/wc-orders.php:958
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-epos-now-integration/inc/wc-products.php:283
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-epos-now-integration/inc/users.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-epos-now-integration/admin/sew-product-extra-tab.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-epos-now-integration/inc/api.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-epos-now-integration/inc/webhooks.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-epos-now-integration/inc/cron.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-epos-now-integration/woo-epos-now-integration.php:147
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_root() in wp-content/plugins/woo-epos-now-integration/admin/sew-admin-log-settings.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=sew-settings
    • > Network (severe)
    wp-admin/admin.php?page=sew-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=slynk-epn-wc-logs
    • > Network (severe)
    wp-admin/admin.php?page=slynk-epn-wc-logs - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: integration, eposnow, order sync, inventory sync, product sync...

woo-epos-now-integration/woo-epos-now-integration.php 92% from 13 tests

Analyzing the main PHP file in "Integration for Epos Now and WooCommerce" version 4.2.2
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9.8" instead of "4.5.0")

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
No dangerous file extensions were detected6,171 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,0694534,547
CSS347501,370
JavaScript21324254

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions122
▷ Named functions12199.18%
▷ Anonymous functions10.82%
Constants5
▷ Global constants5100.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
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
css/jquery-ui/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
css/jquery-ui/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
css/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
css/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%