83% selling-commander-connector

Code Review | Selling Commander for WooCommerce - connector plugin

WordPress plugin Selling Commander for WooCommerce - connector plugin scored83%from 54 tests.

About plugin

  • Plugin page: selling-commander...
  • Plugin version: 1.2.15
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2023
  • Latest release: Oct 18, 2023
  • Number of updates: 12
  • Update frequency: every 18.4 days
  • Top authors: holest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /336 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
This plugin's installer ran successfully

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

A check of server-side resources used by Selling Commander for WooCommerce - connector plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.95 ▼2.57
Dashboard /wp-admin3.32 ▲0.0243.97 ▼4.08
Posts /wp-admin/edit.php3.44 ▲0.0847.00 ▲1.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.90 ▼7.77
Media Library /wp-admin/upload.php3.25 ▲0.0238.51 ▲4.06
Manage products /wp-admin/admin.php?page=sellingcommander-connector-products-justmanage3.3332.13
Selling commander /wp-admin/admin.php?page=sellingcommander-connector3.2131.31
Manage with S.C. /wp-admin/edit.php?post_type=product&page=sellingcommander-connector-products-justmanage3.0823.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Selling Commander for WooCommerce - connector plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.45 ▲0.101.75 ▲0.0841.61 ▼7.96
Dashboard /wp-admin2,222 ▲455.56 ▼0.0583.62 ▼19.4938.73 ▼4.23
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0533.94 ▼1.4342.54 ▲5.96
Add New Post /wp-admin/post-new.php1,557 ▲2718.64 ▼4.50604.41 ▼95.7068.03 ▲14.65
Media Library /wp-admin/upload.php1,427 ▲274.15 ▼0.0393.99 ▼13.8541.55 ▼1.35
Manage products /wp-admin/admin.php?page=sellingcommander-connector-products-justmanage1,3342.0022.6426.51
Selling commander /wp-admin/admin.php?page=sellingcommander-connector7901.9924.1926.61
Manage with S.C. /wp-admin/edit.php?post_type=product&page=sellingcommander-connector-products-justmanage280.420.113.94

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=product&page=sellingcommander-connector-products-justmanage
    • > Network (severe)
    wp-admin/edit.php?post_type=product&page=sellingcommander-connector-products-justmanage - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

selling-commander-connector/sellingcommander.php 85% from 13 tests

The main PHP script in "Selling Commander for WooCommerce - connector plugin" version 1.2.15 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("selling-commander-connector.php" instead of "sellingcommander.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin4,949 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3750464,190
JavaScript1891425
CSS1702334

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity68.09
▷ Minimum class complexity1.00
▷ Maximum class complexity639.00
Average method complexity8.30
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods101
▷ Static methods00.00%
▷ Public methods8988.12%
▷ Protected methods54.95%
▷ Private methods76.93%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/manage_products.png58.31KB21.86KB▼ 62.51%
assets/manage_orders.png67.62KB25.75KB▼ 61.92%