89% dokan-invoice

Code Review | Dokan Invoice

WordPress plugin Dokan Invoice scored 89% from 54 tests.

About plugin

  • Plugin page: dokan-invoice
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2015
  • Latest release: Sep 22, 2023
  • Number of updates: 20
  • Update frequency: every 148.1 days
  • Top authors: sabbir1991 (40%)wedevs (35%)tareq1988 (20%)rafsuntaskin (20%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active / 18,240 total downloads

Benchmarks

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
The plugin installed gracefully, with no errors

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

Server-side resources used by Dokan Invoice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.30 ▼5.61
Dashboard /wp-admin3.31 ▲0.0045.07 ▼2.49
Posts /wp-admin/edit.php3.36 ▲0.0048.15 ▼1.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.53 ▼5.91
Media Library /wp-admin/upload.php3.23 ▲0.0032.62 ▲0.21

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Dokan Invoice
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.67 ▼0.521.75 ▲0.0740.28 ▼2.08
Dashboard /wp-admin2,203 ▲145.83 ▲0.86117.51 ▲8.3840.50 ▲1.42
Posts /wp-admin/edit.php2,092 ▲62.05 ▲0.0439.24 ▲2.4934.08 ▲0.01
Add New Post /wp-admin/post-new.php1,533 ▲1223.23 ▼0.03629.92 ▼51.3352.61 ▲0.09
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.1192.67 ▼12.6541.82 ▼2.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can look at the official readme.txt

dokan-invoice/dokan-invoice.php 92% from 13 tests

The primary PHP file in "Dokan Invoice" version 1.2.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.0.0")

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
No dangerous file extensions were detected182 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP143161182

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin