90% webpos-point-of-sale-for-woocommerce

Code Review | WebPOS – Point of Sale for WooCommerce

WordPress plugin WebPOS – Point of Sale for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: webpos-point-of-s...
  • Plugin version: 1.0.11
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 10, 2022
  • Latest release: Jun 21, 2023
  • Number of updates: 17
  • Update frequency: every 29.2 days
  • Top authors: mytrinh (88.24%)vietmike (11.76%)villatheme (11.76%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /3,121 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: ▼8.63ms] Passed 4 tests

Analyzing server-side resources used by WebPOS – Point of Sale for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.48 ▼2.22
Dashboard /wp-admin3.34 ▼0.0046.08 ▼15.75
Posts /wp-admin/edit.php3.39 ▲0.0443.26 ▼5.68
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.09 ▼10.87
Media Library /wp-admin/upload.php3.26 ▲0.0434.87 ▼0.12

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 128 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

WebPOS – Point of Sale for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲3413.15 ▼1.531.62 ▼0.4342.00 ▼0.33
Dashboard /wp-admin2,211 ▲234.87 ▲0.02113.49 ▲3.8546.14 ▲0.51
Posts /wp-admin/edit.php2,093 ▲72.02 ▼0.0333.72 ▼0.5934.97 ▼0.89
Add New Post /wp-admin/post-new.php1,538 ▲1923.44 ▲0.13614.18 ▼74.3761.68 ▲9.89
Media Library /wp-admin/upload.php1,393 ▲54.24 ▼0.0595.31 ▼6.0343.19 ▼4.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: woocommerce, ecommerce, woo pos, webpos

webpos-point-of-sale-for-woocommerce/webpos-point-of-sale-for-woocommerce.php Passed 13 tests

The principal PHP file in "WebPOS – Point of Sale for WooCommerce" v. 1.0.11 is loaded by WordPress automatically on each request
115 characters long description:
WebPOS – Point of Sale for WooCommerce allows you to sell in your physical retail store and sync with data online

Code Analysis 97% from 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 plugin21,912 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
PHP252442017,454
JavaScript31551366,510
SVG30122,880
CSS341201232,560
Sass936672,508

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 173)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity59.57
▷ Minimum class complexity1.00
▷ Maximum class complexity420.00
Average method complexity7.58
▷ Minimum method complexity1.00
▷ Maximum method complexity173.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods187
▷ Static methods6233.16%
▷ Public methods17794.65%
▷ Protected methods63.21%
▷ Private methods42.14%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png1.22KB1.18KB▼ 3.13%