94% advanced-dashboard-for-woocommerce

Code Review | Advanced Dashboard for WooCommerce

WordPress plugin Advanced Dashboard for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-dashboar...
  • Plugin version: 0.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 5.9.2
  • First release: Dec 15, 2016
  • Latest release: Mar 16, 2017
  • Number of updates: 6
  • Update frequency: every 14.7 days
  • Top authors: Piotr Pesta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,182 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼297.62ms] Passed 4 tests

Analyzing server-side resources used by Advanced Dashboard for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0153.31 ▲2.09
Dashboard /wp-admin3.42 ▲0.0133.19 ▼1.08
Posts /wp-admin/edit.php3.65 ▲0.0136.46 ▼1.95
Add New Post /wp-admin/post-new.php6.89 ▼0.0991.39 ▼1,189.32
Media Library /wp-admin/upload.php3.30 ▲0.0025.79 ▲1.86

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Dashboard for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲8215.93 ▼0.016.37 ▲0.432.38 ▼0.81
Dashboard /wp-admin2,909 ▲556.14 ▼0.03117.72 ▼16.41151.51 ▼7.03
Posts /wp-admin/edit.php2,704 ▲133.25 ▲0.0263.18 ▼0.12142.66 ▼1.89
Add New Post /wp-admin/post-new.php1,695 ▲3819.14 ▼2.33415.87 ▼22.45162.68 ▲10.49
Media Library /wp-admin/upload.php1,716 ▲155.53 ▲0.04130.20 ▼8.78157.34 ▼30.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advanced-dashboard-for-woocommerce/pp-woocommerce-advanced-dashboard.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: reports, woocommerce, dashboard, plugin, quantity...

advanced-dashboard-for-woocommerce/pp-woocommerce-advanced-dashboard.php 92% from 13 tests

The principal PHP file in "Advanced Dashboard for WooCommerce" v. 0.2.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-dashboard-for-woocommerce.php" instead of "pp-woocommerce-advanced-dashboard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin393 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37613369
JavaScript12916
CSS1108

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.25
Average class complexity8.25
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1789.47%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin