10% wc-reports-lite

Code Review | NikanWP WooCommerce Reporting

WordPress plugin NikanWP WooCommerce Reporting scored 10% from 54 tests.

About plugin

  • Plugin page: wc-reports-lite
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Nov 6, 2020
  • Latest release: Nov 12, 2020
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: nikanwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 723 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wc-reports-lite/includes/admin-pages/wcrl-overview.php+3
    include_once(wp-content/plugins/woocommerce/includes/admin/reports/class-wc-admin-report.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼0.00MB] [CPU: ▼143.56ms] Passed 4 tests

Analyzing server-side resources used by NikanWP WooCommerce Reporting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1239.22 ▲15.51
Dashboard /wp-admin3.06 ▲0.0042.54 ▼2.66
Posts /wp-admin/edit.php3.11 ▲0.0043.33 ▼1.65
Add New Post /wp-admin/post-new.php5.42 ▼0.0288.00 ▼571.48
Media Library /wp-admin/upload.php3.00 ▲0.0030.33 ▲1.55

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for NikanWP WooCommerce Reporting
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.99 ▲0.458.16 ▼5.4445.72 ▼3.59
Dashboard /wp-admin2,970 ▲396.08 ▲0.13152.17 ▲9.45116.54 ▲2.48
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0164.23 ▼5.5192.96 ▼1.95
Add New Post /wp-admin/post-new.php1,672 ▼1118.95 ▲0.28376.07 ▲14.14113.44 ▼10.22
Media Library /wp-admin/upload.php1,810 ▼05.00 ▼0.04158.35 ▲20.55119.82 ▲0.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wc-reports-lite/wcrl.php 92% from 13 tests

Analyzing the main PHP file in "NikanWP WooCommerce Reporting" version 1.0.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-reports-lite.php" instead of "wcrl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin4,923 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP192555052,388
CSS464521,491
JavaScript25268758
PO File1207350286

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.83
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods141
▷ Static methods139.22%
▷ Public methods13797.16%
▷ Protected methods00.00%
▷ Private methods42.84%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
14 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
assets/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/images/wooreports.png10.04KB3.95KB▼ 60.71%
assets/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
assets/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%