77% invoiceboo-invoices-for-woocommerce

Code Review | InvoiceBoo - Invoices for WooCommerce

WordPress plugin InvoiceBoo - Invoices for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: invoiceboo-invoic...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2022
  • Latest release: Apr 15, 2023
  • Number of updates: 32
  • Update frequency: every 8.9 days
  • Top authors: streamlinestar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /971 total downloads

Benchmarks

Plugin footprint 82% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲7.32MB] [CPU: ▲33.35ms] 75% from 4 tests

Server-side resources used by InvoiceBoo - Invoices for WooCommerce
Please take the time to fix the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 7.32MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /10.98 ▲7.5275.53 ▲35.91
Dashboard /wp-admin11.00 ▲7.7077.56 ▲27.16
Posts /wp-admin/edit.php11.00 ▲7.6487.19 ▲41.13
Add New Post /wp-admin/post-new.php12.32 ▲6.43127.06 ▲29.18
Media Library /wp-admin/upload.php11.00 ▲7.7776.85 ▲42.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 83 new files
Database: 1 new table, 7 new options
New tables
wp_invoiceboo
New WordPress options
invoiceboo_data
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for InvoiceBoo - Invoices for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.09 ▼0.641.77 ▼0.0038.73 ▼7.12
Dashboard /wp-admin2,201 ▲215.57 ▼0.0289.79 ▲3.5139.39 ▲0.92
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0440.54 ▲4.8636.37 ▲2.29
Add New Post /wp-admin/post-new.php1,542 ▲721.86 ▲3.94706.86 ▲58.8055.36 ▼3.18
Media Library /wp-admin/upload.php1,409 ▲64.18 ▲0.03109.55 ▲12.0749.01 ▲5.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/invoiceboo-invoices-for-woocommerce/admin/partials/invoiceboo-admin-display.php
    • > /wp-content/plugins/invoiceboo-invoices-for-woocommerce/public/partials/invoiceboo-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'InvoiceBoo_TCPDF' not found in wp-content/plugins/invoiceboo-invoices-for-woocommerce/includes/class-invoiceboo-pdf.php:110

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: pdf, woocommerce, woocommerce invoices, invoice, download

invoiceboo-invoices-for-woocommerce/invoiceboo.php 92% from 13 tests

The main PHP script in "InvoiceBoo - Invoices for WooCommerce" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("invoiceboo-invoices-for-woocommerce.php" instead of "invoiceboo.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin48,506 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP431,92912,55747,484
CSS216122826
JavaScript45655125
Markdown137071

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,413)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity277.29
▷ Minimum class complexity1.00
▷ Maximum class complexity4,413.00
Average method complexity9.34
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods795
▷ Static methods11214.09%
▷ Public methods51064.15%
▷ Protected methods27834.97%
▷ Private methods70.88%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants111
▷ Global constants111100.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
There were not PNG files found in your plugin