84% woo-new

Code Review | WooCommerce New Customer Report

WordPress plugin WooCommerce New Customer Report scored84%from 54 tests.

About plugin

  • Plugin page: woo-new
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Aug 10, 2023
  • Number of updates: 24
  • Update frequency: every 107.0 days
  • Top authors: wpfixit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,101 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.05MB] [CPU: ▼0.24ms] Passed 4 tests

Server-side resources used by WooCommerce New Customer Report
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.43 ▼1.48
Dashboard /wp-admin3.35 ▲0.0548.55 ▲0.76
Posts /wp-admin/edit.php3.47 ▲0.1144.30 ▼0.08
Add New Post /wp-admin/post-new.php5.93 ▲0.05102.36 ▲12.21
Media Library /wp-admin/upload.php3.28 ▲0.0534.79 ▼0.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce New Customer Report
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.21 ▼1.061.73 ▲0.0131.33 ▼12.57
Dashboard /wp-admin2,291 ▲1035.88 ▼0.08100.78 ▼4.7185.61 ▲41.66
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0535.46 ▲0.4431.27 ▼2.91
Add New Post /wp-admin/post-new.php1,551 ▲3118.28 ▼5.04613.51 ▼86.0056.57 ▼3.43
Media Library /wp-admin/upload.php1,400 ▲124.31 ▲0.0795.83 ▼2.1944.91 ▲2.95

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-new/index.php

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: woocommerce report, woocommerce stats, woocommerce sales reports, woocommerce, woocommerce sales...

woo-new/woo-new.php 92% from 13 tests

The main file in "WooCommerce New Customer Report" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 166 characters long)

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
Success! There were no dangerous files found in this plugin697 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP3143178533
JavaScript53725135
JSON10029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity14.67
▷ Minimum class complexity7.00
▷ Maximum class complexity22.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2083.33%
▷ Protected methods28.33%
▷ Private methods28.33%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-1.png93.53KB25.68KB▼ 72.55%