10% woocommerce-pos

Code Review | WooCommerce POS

WordPress plugin WooCommerce POS scored10%from 54 tests.

About plugin

  • Plugin page: woocommerce-pos
  • Plugin version: 1.3.12
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: May 2, 2014
  • Latest release: Sep 29, 2023
  • Number of updates: 193
  • Update frequency: every 17.8 days
  • Top authors: kilbot (100%)

Code review

54 tests

User reviews

64 reviews

Install metrics

7,000+ active /253,829 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/woocommerce-pos/vendor/vlucas/phpdotenv/src/Store/File/Reader.php+73
    file_get_contents(wp-content/plugins/woocommerce-pos/.env): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.14ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce POS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.93 ▼31.55
Dashboard /wp-admin2.05 ▼1.266.06 ▼40.10
Posts /wp-admin/edit.php2.05 ▼1.316.46 ▼42.38
Add New Post /wp-admin/post-new.php2.05 ▼3.846.09 ▼105.82
Media Library /wp-admin/upload.php2.05 ▼1.184.97 ▼32.26

Server storage [IO: ▲2.17MB] [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: 397 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WooCommerce POS: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.08 ▼0.212.33 ▲0.7359.26 ▲11.13
Dashboard /wp-admin2,192 ▲185.62 ▼0.0591.57 ▲1.6941.95 ▲4.91
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0133.48 ▼0.1431.53 ▼2.64
Add New Post /wp-admin/post-new.php1,526 ▼023.16 ▼0.04657.24 ▲16.5258.36 ▲5.31
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0893.64 ▼6.6242.58 ▼2.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/woocommerce-pos/vendor/vlucas/phpdotenv/src/Store/File/Reader.php+73
    file_get_contents(wp-content/plugins/woocommerce-pos/.env): failed to open stream: No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woocommerce-pos/includes/Admin/templates/upgrade.php
  • 171× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\DebugBar\\Panel' not found in wp-content/plugins/woocommerce-pos/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/DebugBar/PluginPanel.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Brick\\Math\\Internal\\Calculator' not found in wp-content/plugins/woocommerce-pos/vendor/brick/math/src/Internal/Calculator/NativeCalculator.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WCPOS\\WooCommercePOS\\API\\Abstracts\\Controller' not found in wp-content/plugins/woocommerce-pos/includes/API/Settings.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Builder\\UuidBuilderInterface' not found in wp-content/plugins/woocommerce-pos/vendor/ramsey/uuid/src/Nonstandard/UuidBuilder.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOption\\Option' not found in wp-content/plugins/woocommerce-pos/vendor/phpoption/phpoption/src/PhpOption/None.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Validator\\ValidatorInterface' not found in wp-content/plugins/woocommerce-pos/vendor/ramsey/uuid/src/Rfc4122/Validator.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Rfc4122\\FieldsInterface' not found in wp-content/plugins/woocommerce-pos/vendor/ramsey/uuid/src/Nonstandard/Fields.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\WriterInterface' not found in wp-content/plugins/woocommerce-pos/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Store\\StoreInterface' not found in wp-content/plugins/woocommerce-pos/vendor/vlucas/phpdotenv/src/Store/StringStore.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\Metadata' not found in wp-content/plugins/woocommerce-pos/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Plugin/PluginInfo.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

woocommerce-pos/woocommerce-pos.php 85% from 13 tests

This is the main PHP file of "WooCommerce POS" version 1.3.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 148 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected29,925 lines of code in 378 files:
LanguageFilesBlank linesComment linesLines of code
PHP3556,57117,39728,188
JSON380961
Markdown62380518
SVG600118
CSS214156
JavaScript38940
XML24426
make18018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity9.47
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces64
Interfaces40
Traits13
Classes266
▷ Abstract classes166.02%
▷ Concrete classes25093.98%
▷ Final classes6526.00%
Methods1,984
▷ Static methods26013.10%
▷ Public methods1,63082.16%
▷ Protected methods1698.52%
▷ Private methods1859.32%
Functions224
▷ Named functions12354.91%
▷ Anonymous functions10145.09%
Constants203
▷ Global constants167.88%
▷ Class constants18792.12%
▷ Public constants15281.28%

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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-square.png18.28KB18.41KB0.00%