72% woo-advance-reporting

Code Review | WooCommerce Advance Reporting

WordPress plugin WooCommerce Advance Reporting scored 72% from 54 tests.

About plugin

  • Plugin page: woo-advance-repor...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Aug 26, 2016
  • Latest release: Sep 16, 2016
  • Number of updates: 11
  • Update frequency: every 1.9 days
  • Top authors: webnware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,539 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼289.55ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Advance Reporting
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0156.77 ▲4.98
Dashboard /wp-admin3.42 ▲0.0232.70 ▼1.45
Posts /wp-admin/edit.php3.65 ▲0.0136.17 ▼0.05
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.16 ▼1,160.11
Media Library /wp-admin/upload.php3.30 ▲0.0126.65 ▲3.42
Advance Reporting /wp-admin/admin.php?page=advance-reporting3.2421.80

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Advance Reporting
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲1816.28 ▲0.345.83 ▼0.512.38 ▼0.15
Dashboard /wp-admin2,898 ▲376.45 ▲0.41123.05 ▼10.01159.15 ▼6.95
Posts /wp-admin/edit.php2,694 ▼03.26 ▲0.0161.99 ▼1.94142.20 ▼4.93
Add New Post /wp-admin/post-new.php1,723 ▲6220.75 ▲4.36440.70 ▼1.22158.35 ▼2.44
Media Library /wp-admin/upload.php1,705 ▲135.62 ▲0.10128.38 ▼24.18184.07 ▼12.21
Advance Reporting /wp-admin/admin.php?page=advance-reporting8332.2837.8670.36

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
  • Zombie WordPress options were found after uninstall: 1 option
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=advance-reporting
    • > Error in wp-content/plugins/woo-advance-reporting/reporting.php+13
    Uncaught Error: Call to undefined function get_woocommerce_currency() in wp-content/plugins/woo-advance-reporting/reporting.php:13
    Stack trace:
    #0 wp-includes/class-wp-hook.php(307): advance_reporting_callback()
    #1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(474): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-advance-reporting/woocommerce-advance-reporting.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-advance-reporting/reporting.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

woo-advance-reporting/woocommerce-advance-reporting.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Advance Reporting" version 1.0.1
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-advance-reporting.php" instead of "woocommerce-advance-reporting.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 214 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 detected372 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31813344
CSS117028

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin