10% customer-reports-woocommerce

Code Review | Customer Reports Woocommerce

WordPress plugin Customer Reports Woocommerce scored 10% from 54 tests.

About plugin

  • Plugin page: customer-reports-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 5.8.1
  • First release: Apr 14, 2020
  • Latest release: Apr 14, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: goliver79 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 233 total downloads


Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/customer-reports-woocommerce/includes/WCGoReportSalesByCustomer.php+2
    require_once(wp-content/plugins/woocommerce/includes/admin/reports/class-wc-admin-report.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.00MB] [CPU: ▼171.26ms] Passed 4 tests

This is a short check of server-side resources used by Customer Reports Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1233.92 ▲11.65
Dashboard /wp-admin3.06 ▲0.0047.08 ▼1.96
Posts /wp-admin/edit.php3.11 ▲0.0045.28 ▼0.34
Add New Post /wp-admin/post-new.php5.42 ▼0.0287.65 ▼689.11
Media Library /wp-admin/upload.php3.00 ▲0.0037.81 ▲6.38

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: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Customer Reports Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲9716.26 ▲0.9211.51 ▲2.2942.59 ▼9.67
Dashboard /wp-admin2,969 ▲355.94 ▼0.03156.78 ▲0.69104.01 ▼1.86
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0072.03 ▲3.9689.29 ▼2.64
Add New Post /wp-admin/post-new.php1,672 ▲14618.77 ▲0.17396.68 ▲16.78107.26 ▼2.92
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.05149.61 ▼7.65111.56 ▲3.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/woocommerce/includes/admin/reports/class-wc-admin-report.php): failed to open stream: No such file or directory in wp-content/plugins/customer-reports-woocommerce/includes/WCGoReportSalesByCustomer.php on line 2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/customer-reports-woocommerce/includes/WCGoReportSalesByCustomer.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/woocommerce/includes/admin/reports/class-wc-admin-report.php' (include_path='.:/usr/share/php') in wp-content/plugins/customer-reports-woocommerce/includes/WCGoReportSalesByCustomer.php on line 2

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: best customer, excel, cvs, woocommerce, customers...

customer-reports-woocommerce/woocommerce-go-customer-reports.php 85% from 13 tests

The main PHP file in "Customer Reports Woocommerce" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("customer-reports-woocommerce.php" instead of "woocommerce-go-customer-reports.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin448 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File1111141

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG images were found in this plugin