84% dokan-order-approval

Code Review | Dokan Order Approval

WordPress plugin Dokan Order Approval scored84%from 54 tests.

About plugin

  • Plugin page: dokan-order-approval
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 10, 2020
  • Latest release: Oct 27, 2023
  • Number of updates: 25
  • Update frequency: every 43.4 days
  • Top authors: sarankumar (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.67ms] Passed 4 tests

An overview of server-side resources used by Dokan Order Approval
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2347.80 ▲8.86
Dashboard /wp-admin3.58 ▲0.2877.39 ▲26.33
Posts /wp-admin/edit.php3.62 ▲0.2647.33 ▲1.68
Add New Post /wp-admin/post-new.php6.09 ▲0.2080.98 ▼11.53
Media Library /wp-admin/upload.php3.43 ▲0.2035.28 ▲3.66

Server storage [IO: ▲0.13MB] [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: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Dokan Order Approval: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.29 ▼0.431.76 ▲0.0544.91 ▼2.45
Dashboard /wp-admin2,239 ▲585.63 ▼0.2983.18 ▼17.3441.92 ▼6.59
Posts /wp-admin/edit.php2,139 ▲392.13 ▲0.1235.96 ▼0.1631.54 ▼3.04
Add New Post /wp-admin/post-new.php1,560 ▲3423.11 ▼0.05678.40 ▲3.0858.91 ▲2.16
Media Library /wp-admin/upload.php1,436 ▲364.25 ▲0.05100.33 ▼8.5346.51 ▼0.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/dokan-order-approval/includes/class-dokan-order-approval-vendor-order.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dokan-order-approval/includes/class-sg-dokan-order-approval-wc_email.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sevengits\\is_admin() in wp-content/plugins/dokan-order-approval/plugin-deactivation-survey/deactivate-feedback-form.php:5

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: dokan pre order, dokan, dokan order, dokan order approval, dokan-lite

dokan-order-approval/dokan-order-approval.php 92% from 13 tests

"Dokan Order Approval" version 2.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "3.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,547 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP162671,0201,084
CSS610847353
JavaScript2251292
Markdown17018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.90
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods61
▷ Static methods34.92%
▷ Public methods4573.77%
▷ Protected methods813.11%
▷ Private methods813.11%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants5
▷ Global constants5100.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 were not PNG files found in your plugin