94% woocom-role-based-reports

Code Review | Woocom Role Based Reports

WordPress plugin Woocom Role Based Reports scored 94% from 54 tests.

About plugin

  • Plugin page: woocom-role-based...
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5.1
  • WordPress version: 5.8.1
  • First release: Oct 28, 2016
  • Latest release: Sep 2, 2020
  • Number of updates: 7
  • Update frequency: every 200.7 days
  • Top authors: DBAR Productions (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,524 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Woocom Role Based Reports
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1343.39 ▲13.01
Dashboard /wp-admin3.07 ▲0.0252.61 ▲2.21
Posts /wp-admin/edit.php3.12 ▲0.0250.69 ▲3.44
Add New Post /wp-admin/post-new.php5.43 ▼0.0094.50 ▼561.24
Media Library /wp-admin/upload.php3.01 ▲0.0132.56 ▼1.27

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Woocom Role Based Reports
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲12115.85 ▲0.299.64 ▼0.6048.74 ▼8.87
Dashboard /wp-admin2,967 ▲365.93 ▼0.15139.15 ▼19.02113.60 ▼8.18
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0071.08 ▲1.0995.20 ▼2.44
Add New Post /wp-admin/post-new.php1,604 ▼7918.89 ▲0.09392.64 ▲8.46115.89 ▼1.89
Media Library /wp-admin/upload.php1,810 ▼05.02 ▼0.01154.04 ▼0.55130.51 ▲5.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocom-role-based-reports/woocom-role-based-reports.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: roles, reports, sales, woocommerce, users...

woocom-role-based-reports/woocom-role-based-reports.php Passed 13 tests

"Woocom Role Based Reports" version 0.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
Filter WooCommerce Sales Reports by user role

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2132190

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
There were not PNG files found in your plugin