84% wepos

Code Review | wePOS - Point Of Sale (POS) for WooCommerce

WordPress plugin wePOS - Point Of Sale (POS) for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wepos
  • Plugin version: 1.2.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2019
  • Latest release: Jan 2, 2023
  • Number of updates: 45
  • Update frequency: every 31.4 days
  • Top authors: sabbir1991 (46.67%)tareq1988 (40%)wedevs (17.78%)

Code review

54 tests

User reviews

19 reviews

Install metrics

2,000+ active /80,016 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.77ms] Passed 4 tests

An overview of server-side resources used by wePOS - Point Of Sale (POS) for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.34 ▼0.63
Dashboard /wp-admin3.33 ▼0.0149.00 ▼15.96
Posts /wp-admin/edit.php3.39 ▲0.0350.51 ▼1.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.37 ▼24.89
Media Library /wp-admin/upload.php3.26 ▲0.0340.24 ▲0.75

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
we_pos_installed
widget_recent-comments
db_upgraded
we_pos_version
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for wePOS - Point Of Sale (POS) for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.38 ▲0.031.84 ▲0.2445.51 ▲0.13
Dashboard /wp-admin2,216 ▲475.67 ▼0.0685.83 ▼20.0843.65 ▲1.47
Posts /wp-admin/edit.php2,119 ▲191.98 ▲0.0032.88 ▼8.2833.82 ▼6.46
Add New Post /wp-admin/post-new.php1,544 ▲1823.08 ▼0.25700.28 ▲66.9957.30 ▲3.45
Media Library /wp-admin/upload.php1,421 ▲214.12 ▼0.12111.39 ▲2.0949.66 ▲2.26

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • we_pos_installed
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • we_pos_version
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Taxes_V2_Controller' not found in wp-content/plugins/wepos/includes/REST/TaxController.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wepos/languages/wepos.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wepos/templates/wepos.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/wepos/includes/Gateways/Cash.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Products_Controller' not found in wp-content/plugins/wepos/includes/REST/ProductController.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wepos/includes/Admin/Updates/upgrade-1.0.4.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wepos/includes/REST/SettingController.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Orders_Controller' not found in wp-content/plugins/wepos/includes/REST/PaymentController.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_REST_Customers_Controller' not found in wp-content/plugins/wepos/includes/REST/CustomerController.php:7

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: free pos, woocommerce point of sale, woocommerce pos, point of sale, pos plugin

wepos/wepos.php 92% from 13 tests

"wePOS - Point Of Sale (POS) for WooCommerce" version 1.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "5.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,445 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP399592,0963,995
JavaScript161182,0401,844
LESS115021,031
Markdown1700196
SVG113195
CSS122351107
JSON20077

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.93
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes13.70%
Methods257
▷ Static methods207.78%
▷ Public methods21784.44%
▷ Protected methods72.72%
▷ Private methods3312.84%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/no-product.png20.99KB6.45KB▼ 69.29%
assets/images/empty-cart.png18.19KB5.69KB▼ 68.72%
assets/images/sale-completed.png44.37KB11.46KB▼ 74.18%