88% advanced-store-control-for-woocommerce

Code Review | Advanced Store Control for WooCommerce

WordPress plugin Advanced Store Control for WooCommerce scored 88% from 54 tests.

About plugin

  • Plugin page: advanced-store-co...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 5.8.1
  • First release: Feb 12, 2022
  • Latest release: Feb 16, 2022
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: ascgroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 88 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼144.28ms] Passed 4 tests

Server-side resources used by Advanced Store Control for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0632.21 ▲2.17
Dashboard /wp-admin3.31 ▲0.2536.96 ▼5.56
Posts /wp-admin/edit.php3.36 ▲0.2537.24 ▲2.70
Add New Post /wp-admin/post-new.php5.61 ▲0.1777.94 ▼576.43
Media Library /wp-admin/upload.php3.19 ▲0.1928.34 ▲4.18
Suppliers /wp-admin/admin.php?page=asc_suppliers3.1623.04
Dashboard /wp-admin/admin.php?page=asc_dashboard3.1927.10

Server storage [IO: ▲0.19MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 43 new files
Database: 6 new tables, no new options
New tables

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Store Control for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,705 ▲10415.68 ▲0.055.50 ▲0.0274.74 ▼6.40
Dashboard /wp-admin2,968 ▲726.04 ▼0.03117.19 ▼16.64168.71 ▼6.21
Posts /wp-admin/edit.php2,783 ▲403.25 ▲0.0161.88 ▼4.19135.69 ▼8.52
Add New Post /wp-admin/post-new.php2,523 ▼1,22016.30 ▼2.76402.85 ▼41.43160.99 ▼2.99
Media Library /wp-admin/upload.php1,792 ▲405.61 ▲0.08138.15 ▼2.33183.96 ▼2.26
Suppliers /wp-admin/admin.php?page=asc_suppliers1,0732.4153.45101.64
Dashboard /wp-admin/admin.php?page=asc_dashboard1,1212.5653.64132.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=asc_suppliers
    • > Warning in wp-admin/includes/plugin.php+299
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/advanced-store-control-for-woocommerce/views/report.php on line 6
    • > PHP Fatal error
      Trait 'ASC\\Traits\\Model' not found in wp-content/plugins/advanced-store-control-for-woocommerce/models/tables.php on line 13
    • > PHP Warning
      set_exception_handler() expects the argument (ASC\\Controllers\\Controller_Log::exception) to be a valid callback in wp-content/plugins/advanced-store-control-for-woocommerce/functions.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/advanced-store-control-for-woocommerce/views/suppliers.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ASC\\View\\wp_create_nonce() in wp-content/plugins/advanced-store-control-for-woocommerce/views/dashboard.php:8
    • > PHP Fatal error
      Trait 'ASC\\Traits\\Model' not found in wp-content/plugins/advanced-store-control-for-woocommerce/models/products.php on line 15
    • > PHP Fatal error
      Trait 'ASC\\Traits\\Model' not found in wp-content/plugins/advanced-store-control-for-woocommerce/models/suppliers.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ASC\\View\\wp_create_nonce() in wp-content/plugins/advanced-store-control-for-woocommerce/views/supplier.php:10
    • > PHP Fatal error
      Trait 'ASC\\Traits\\Model' not found in wp-content/plugins/advanced-store-control-for-woocommerce/models/log.php on line 12
    • > PHP Fatal error
      Trait 'ASC\\Traits\\Model' not found in wp-content/plugins/advanced-store-control-for-woocommerce/models/categories.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: The official readme.txt might help

advanced-store-control-for-woocommerce/advanced-store-control.php 92% from 13 tests

This is the main PHP file of "Advanced Store Control for WooCommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advanced-store-control-for-woocommerce.php" instead of "advanced-store-control.php")

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
There were no executable files found in this plugin3,591 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PO File1147188373

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.87
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
▷ Static methods32.11%
▷ Public methods12285.92%
▷ Protected methods74.93%
▷ Private methods139.15%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants1285.71%
▷ Class constants214.29%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin