89% webd-woocommerce-advanced-reporting-statistics

Code Review | Advanced WooCommerce Product Sales Reporting - Statistics & Forecast

WordPress plugin Advanced WooCommerce Product Sales Reporting - Statistics & Forecast scored89%from 54 tests.

About plugin

  • Plugin page: webd-woocommerce-...
  • Plugin version: 1.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2019
  • Latest release: Sep 17, 2023
  • Number of updates: 36
  • Update frequency: every 47.1 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /5,255 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.34MB] [CPU: ▼3.49ms] Passed 4 tests

Server-side resources used by Advanced WooCommerce Product Sales Reporting - Statistics & Forecast
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3443.48 ▼3.46
Dashboard /wp-admin3.65 ▲0.3445.58 ▲0.52
Posts /wp-admin/edit.php3.76 ▲0.4048.92 ▲1.41
Add New Post /wp-admin/post-new.php6.25 ▲0.3684.01 ▼12.41
Media Library /wp-admin/upload.php3.57 ▲0.3438.02 ▲6.28

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced WooCommerce Product Sales Reporting - Statistics & Forecast
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲17613.97 ▼0.331.63 ▼0.6042.26 ▼1.32
Dashboard /wp-admin2,305 ▲1205.69 ▼0.24114.66 ▲6.0076.60 ▲34.64
Posts /wp-admin/edit.php2,206 ▲1172.54 ▲0.5443.22 ▲1.6836.79 ▼0.15
Add New Post /wp-admin/post-new.php1,629 ▲11523.57 ▲5.99676.94 ▲4.1936.52 ▼22.76
Media Library /wp-admin/upload.php1,496 ▲1084.98 ▲0.78100.43 ▼10.8276.70 ▲29.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: woocommerce statistics, sales report, woocommerce sales, analytics, reporting

webd-woocommerce-advanced-reporting-statistics/webd-woocommerce-reporting-statistics.php 77% from 13 tests

The main PHP file in "Advanced WooCommerce Product Sales Reporting - Statistics & Forecast" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "2.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("webd-woocommerce-advanced-reporting-statistics.php" instead of "webd-woocommerce-reporting-statistics.php")
  • Description: The description should be shorter than 140 characters (currently 193 characters long)

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
Good job! No executable or dangerous file extensions detected14,471 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,1972,14110,295
PHP2254631,698
CSS398581,537
SVG100685
PO File1232353256

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity83.00
▷ Minimum class complexity1.00
▷ Maximum class complexity165.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/webd-woocommerce-reporting-statistics-pro.png40.81KB16.52KB▼ 59.51%
images/extendwp.png5.75KB3.37KB▼ 41.46%
images/webd-woocommerce-reporting-statistics.png35.30KB14.13KB▼ 59.97%