89% yesh-invoice-invoices-for-woocommerce

Code Review | Yesh Invoice Invoices for WooCommerce

WordPress plugin Yesh Invoice Invoices for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: yesh-invoice-invo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2021
  • Latest release: Jul 26, 2023
  • Number of updates: 22
  • Update frequency: every 28.7 days
  • Top authors: yeshbemanager (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /324 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.13ms] Passed 4 tests

A check of server-side resources used by Yesh Invoice Invoices for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.34 ▲0.75
Dashboard /wp-admin3.41 ▲0.1049.62 ▼3.07
Posts /wp-admin/edit.php3.52 ▲0.1645.81 ▼1.14
Add New Post /wp-admin/post-new.php5.99 ▲0.1092.34 ▲2.54
Media Library /wp-admin/upload.php3.33 ▲0.1034.27 ▼1.04

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Yesh Invoice Invoices for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.541.82 ▲0.1643.48 ▲2.88
Dashboard /wp-admin2,203 ▲154.88 ▼0.98118.94 ▲11.7643.48 ▼0.02
Posts /wp-admin/edit.php2,086 ▼32.05 ▲0.0738.44 ▼3.1030.84 ▼4.49
Add New Post /wp-admin/post-new.php1,514 ▼2317.56 ▼0.54649.07 ▲39.0159.85 ▲2.66
Media Library /wp-admin/upload.php1,388 ▼34.25 ▲0.0795.63 ▼4.3640.88 ▼6.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Yesh Invoice Invoices for WooCommerce settings.), #2 (Download order invoice button on order page.), #3 (Download order invoice button on order detail page.), #4 (Download order invoice button on My account > Order page.)
You can look at the official readme.txt

yesh-invoice-invoices-for-woocommerce/wc-invoices-yeshinvoice.php 85% from 13 tests

The principal PHP file in "Yesh Invoice Invoices for WooCommerce" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yesh-invoice-invoices-for-woocommerce.php" instead of "wc-invoices-yeshinvoice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin680 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8247405359
PO File4121149321

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.40
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin