93% invoices-for-woocommerce

Code Review | Invoices for WooCommerce

WordPress plugin Invoices for WooCommerce scored 93% from 54 tests.

About plugin

  • Plugin page: invoices-for-wooc...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.7
  • WordPress version: 5.9.2
  • First release: Jul 13, 2018
  • Latest release: Jul 14, 2018
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: RapidDev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 403 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Invoices for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0455.20 ▲5.01
Dashboard /wp-admin3.44 ▲0.0333.35 ▼13.11
Posts /wp-admin/edit.php3.67 ▲0.0339.44 ▼1.65
Add New Post /wp-admin/post-new.php6.91 ▼0.06146.35 ▼1,115.30
Media Library /wp-admin/upload.php3.32 ▲0.0326.20 ▲0.21

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

Input-output and database impact of this plugin
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

Checking browser requirements for Invoices for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲7415.32 ▼0.305.90 ▲0.232.97 ▲0.97
Dashboard /wp-admin2,918 ▲606.16 ▼0.01116.31 ▼24.55178.72 ▲17.98
Posts /wp-admin/edit.php2,712 ▲213.24 ▲0.0162.26 ▼0.12173.84 ▲27.60
Add New Post /wp-admin/post-new.php1,677 ▲1615.67 ▲0.12456.79 ▲39.82226.99 ▲5.59
Media Library /wp-admin/upload.php1,718 ▲205.50 ▼0.01294.62 ▲149.24290.46 ▲91.15

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 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/invoices-for-woocommerce/invoices_woocommerce.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Order page), #2 (Sending notification), #3 (Notes to order), #4 (Email), #5 (Orders page)
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

invoices-for-woocommerce/invoices_woocommerce.php 85% from 13 tests

This is the main PHP file of "Invoices for WooCommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("invoices-for-woocommerce.php" instead of "invoices_woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected199 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11666143
PO File1182156

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin