89% ni-woocommerce-dashboard-report

Code Review | Ni WooCommerce Dashboard Sales Report

WordPress plugin Ni WooCommerce Dashboard Sales Report scored89%from 54 tests.

About plugin

  • Plugin page: ni-woocommerce-da...
  • Plugin version: 2.2.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: May 24, 2023
  • Number of updates: 51
  • Update frequency: every 48.3 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /14,271 total downloads


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
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼10.07ms] Passed 4 tests

A check of server-side resources used by Ni WooCommerce Dashboard Sales Report
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.55 ▼3.03
Dashboard /wp-admin3.39 ▲0.0441.05 ▼20.49
Posts /wp-admin/edit.php3.53 ▲0.1745.28 ▼0.85
Add New Post /wp-admin/post-new.php5.99 ▲0.1088.99 ▼15.91
Media Library /wp-admin/upload.php3.34 ▲0.1035.82 ▲1.82

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Ni WooCommerce Dashboard Sales Report
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,334 ▼41212.42 ▼2.171.88 ▼0.5531.76 ▼17.23
Dashboard /wp-admin1,743 ▼4421.38 ▼3.4813.84 ▼93.1539.79 ▼2.31
Posts /wp-admin/edit.php2,094 ▲22.02 ▼0.0043.82 ▲7.4444.82 ▲11.01
Add New Post /wp-admin/post-new.php1,531 ▼1123.07 ▲5.11674.06 ▲44.0535.13 ▼17.19
Media Library /wp-admin/upload.php1,393 ▲114.25 ▲0.0594.40 ▼13.0240.27 ▼3.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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)
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Ni WooCommerce Sales Order Status), #2 (Ni WooCommerce Recent Order), #3 (WooCommerce Sales Analysis Reports), #4 (Ni WooCommerce Sales By Month Report), #5 (Last Order Date), #6 (New Customer Report), #7 (Top 10 Sold Product)
You can take inspiration from this readme.txt

ni-woocommerce-dashboard-report/ni-woocommerce-dashboard-report.php 85% from 13 tests

"Ni WooCommerce Dashboard Sales Report" version 2.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)

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
Success! There were no dangerous files found in this plugin787 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File14393106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png11.22KB5.06KB▼ 54.87%
screenshot-7.png19.99KB7.40KB▼ 62.99%
screenshot-6.png7.56KB2.99KB▼ 60.47%
screenshot-2.png14.46KB7.30KB▼ 49.49%
screenshot-5.png8.83KB3.93KB▼ 55.48%