84% consignment-store-for-woocommerce

Code Review | Consignment Store For WooCommerce

WordPress plugin Consignment Store For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: consignment-store...
  • Plugin version: 1.7.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.0
  • WordPress version: 6.3.1
  • First release: Sep 16, 2021
  • Latest release: Apr 8, 2023
  • Number of updates: 23
  • Update frequency: every 24.8 days
  • Top authors: sjcope (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,085 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▲0.54ms] Passed 4 tests

An overview of server-side resources used by Consignment Store For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3445.36 ▲5.66
Dashboard /wp-admin3.65 ▲0.3458.51 ▲6.54
Posts /wp-admin/edit.php3.76 ▲0.4053.87 ▲3.85
Add New Post /wp-admin/post-new.php6.25 ▲0.3693.73 ▼9.44
Media Library /wp-admin/upload.php3.57 ▲0.3439.35 ▲2.08
Manage Payouts /wp-admin/admin.php?page=cws_cons_payments3.5133.87
Submitted Items /wp-admin/admin.php?page=cws_cons_top_level3.5137.57
Documentation /wp-admin/admin.php?page=cws_cons_docs3.7135.80
Settings /wp-admin/admin.php?page=cwscs_app_settings3.5134.90

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: 3 new tables, 6 new options
New tables
wp_cwscs_errorlog
wp_cwscs_settings
wp_cwscs_inventory
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Consignment Store For WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17713.37 ▼0.9810.21 ▲8.4733.49 ▼12.32
Dashboard /wp-admin2,227 ▲505.58 ▼0.0487.00 ▼4.3141.69 ▲1.96
Posts /wp-admin/edit.php2,141 ▲442.01 ▲0.0041.52 ▲5.4734.57 ▼2.62
Add New Post /wp-admin/post-new.php1,405 ▼12118.97 ▼4.25528.91 ▼173.1660.69 ▼1.82
Media Library /wp-admin/upload.php1,438 ▲384.17 ▼0.04103.43 ▼5.2145.58 ▲0.00
Manage Payouts /wp-admin/admin.php?page=cws_cons_payments8812.1830.6028.63
Submitted Items /wp-admin/admin.php?page=cws_cons_top_level8172.0024.7834.27
Documentation /wp-admin/admin.php?page=cws_cons_docs1,0132.0024.0935.80
Settings /wp-admin/admin.php?page=cwscs_app_settings1,0272.1726.1329.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cwscs_app_settings
    • > Notice in wp-content/plugins/consignment-store-for-woocommerce/admin/class-cws-consignment-admin.php+310
    Undefined index: SCRIPT_URL

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% 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
2 plugin tags: consignment store, consignment for woocommerce

consignment-store-for-woocommerce/cws-consignment.php 85% from 13 tests

The main file in "Consignment Store For WooCommerce" v. 1.7.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("consignment-store-for-woocommerce.php" instead of "cws-consignment.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,180 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP131958502,351
JavaScript32035506
CSS2918323

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity18.86
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin