84% customer-statistics-for-woocommerce

Code Review | Customer Statistics for WooCommerce

WordPress plugin Customer Statistics for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: customer-statisti...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2019
  • Latest release: Feb 24, 2019
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: kkotha82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 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.00MB] [CPU: ▼3.52ms] Passed 4 tests

Server-side resources used by Customer Statistics for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.84 ▼2.38
Dashboard /wp-admin3.31 ▲0.0055.94 ▲1.75
Posts /wp-admin/edit.php3.36 ▲0.0053.02 ▲4.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.37 ▼16.99
Media Library /wp-admin/upload.php3.23 ▲0.0039.72 ▲3.54

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Customer Statistics for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.39 ▲0.101.88 ▼0.3939.92 ▼5.77
Dashboard /wp-admin2,206 ▲185.89 ▲0.97112.36 ▼8.2341.91 ▲1.45
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0139.36 ▲0.5734.44 ▼1.56
Add New Post /wp-admin/post-new.php1,542 ▲2818.05 ▲0.38610.04 ▼64.0061.42 ▲1.20
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.06100.22 ▼17.0342.94 ▼8.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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 following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/customer-statistics-for-woocommerce/customer-statistics-for-woocommerce.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/customer-statistics-for-woocommerce/customer-statistics-for-woocommerce.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customer-statistics-for-woocommerce/customer-statistics-for-woocommerce.php:15
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/customer-statistics-for-woocommerce/customer-statistics-for-woocommerce.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

customer-statistics-for-woocommerce/customer-statistics-for-woocommerce.php Passed 13 tests

The entry point to "Customer Statistics for WooCommerce" version 1.1 is a PHP file that has certain tags in its header comment area
65 characters long description:
Adds a column to WooCommerce Orders List with Customer Statistics

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 plugin438 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4357307
CSS1171131

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.75
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods960.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin