62% invoicing

Code Review | Payment forms, Buy now buttons and Invoicing System | GetPaid

WordPress plugin Payment forms, Buy now buttons and Invoicing System | GetPaid scored62%from 54 tests.

About plugin

  • Plugin page: invoicing
  • Plugin version: 2.8.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Nov 21, 2023
  • Number of updates: 125
  • Update frequency: every 18.5 days
  • Top authors: stiofansisland (98.4%)wpdev10 (2.4%)

Code review

54 tests

User reviews

33 reviews

Install metrics

5,000+ active /241,844 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲6.94MB] [CPU: ▲85.20ms] 25% from 4 tests

An overview of server-side resources used by Payment forms, Buy now buttons and Invoicing System | GetPaid
The following require your attention
  • RAM: You should keep total memory usage under 10MB (currently 10.51MB on /wp-admin/edit.php?post_type=wpi_invoice)
  • CPU: Total CPU usage must kept under 500.00ms (currently 527.65ms on /wp-admin/admin.php?page=wpinv-reports)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 6.94MB on /wp-admin/edit.php?post_type=wpi_invoice)
PageMemory (MB)CPU Time (ms)
Home /9.84 ▲6.38114.52 ▲71.89
Dashboard /wp-admin10.44 ▲7.09130.64 ▲72.39
Posts /wp-admin/edit.php10.50 ▲7.14112.97 ▲66.31
Add New Post /wp-admin/post-new.php14.35 ▲8.47222.99 ▲130.20
Media Library /wp-admin/upload.php10.38 ▲7.152,075.23 ▲2,041.37
Extensions /wp-admin/admin.php?page=wpi-addons11.102,581.66
Discounts /wp-admin/edit.php?post_type=wpi_discount10.51512.14
Settings /wp-admin/admin.php?page=wpinv-settings11.73533.78
Font Awesome /wp-admin/options-general.php?page=wp-font-awesome-settings10.52100.28
Items /wp-admin/edit.php?post_type=wpi_item10.51100.90
AyeCode UI /wp-admin/options-general.php?page=ayecode-ui-settings10.66512.32
Payment Forms /wp-admin/edit.php?post_type=wpi_payment_form10.68112.69
Reports /wp-admin/admin.php?page=wpinv-reports10.77527.65
Subscriptions /wp-admin/admin.php?page=wpinv-subscriptions10.79104.12
Invoices /wp-admin/edit.php?post_type=wpi_invoice10.51101.87

Server storage [IO: ▲14.37MB] [DB: ▲0.14MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 930 new files
Database: 5 new tables, 25 new options
New tables
wp_getpaid_invoice_items
wp_wpinv_subscriptions
wp_getpaid_invoices
wp_getpaid_customer_meta
wp_getpaid_customers
New WordPress options
wpinv_tax_rates
wpinv_maxmind_database_prefix
wpinv_default_payment_form
widget_getpaid
theysaidso_admin_options
widget_recent-comments
wpinv_version
can_compress_scripts
gepaid_installed_on
wpinv_cleared_old_events
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment forms, Buy now buttons and Invoicing System | GetPaid
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲29914.36 ▲0.0218.95 ▲17.3242.60 ▼3.40
Dashboard /wp-admin2,297 ▲1205.60 ▲0.0490.57 ▼9.4640.72 ▼5.65
Posts /wp-admin/edit.php2,205 ▲1021.94 ▲0.0139.38 ▼3.2535.74 ▲1.88
Add New Post /wp-admin/post-new.php1,558 ▲2918.85 ▼4.80583.22 ▼74.3249.86 ▼4.66
Media Library /wp-admin/upload.php1,509 ▲1064.12 ▼0.07102.09 ▲5.1641.66 ▼2.83
Extensions /wp-admin/admin.php?page=wpi-addons1,5812.4258.4841.29
Discounts /wp-admin/edit.php?post_type=wpi_discount1,2552.4759.7127.86
Settings /wp-admin/admin.php?page=wpinv-settings2,4432.4653.0930.53
Font Awesome /wp-admin/options-general.php?page=wp-font-awesome-settings1,1852.0224.5039.28
Items /wp-admin/edit.php?post_type=wpi_item1,2572.4151.2728.82
AyeCode UI /wp-admin/options-general.php?page=ayecode-ui-settings1,1622.2433.1433.58
Payment Forms /wp-admin/edit.php?post_type=wpi_payment_form1,7702.4552.9632.36
Reports /wp-admin/admin.php?page=wpinv-reports2,1615.56194.8156.85
Subscriptions /wp-admin/admin.php?page=wpinv-subscriptions1,2252.5351.0534.81
Invoices /wp-admin/edit.php?post_type=wpi_invoice1,2182.4161.3031.35

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 5 tables
    • wp_getpaid_customer_meta
    • wp_getpaid_customers
    • wp_wpinv_subscriptions
    • wp_getpaid_invoice_items
    • wp_getpaid_invoices
  • This plugin does not fully uninstall, leaving 26 options in the database
    • widget_getpaid
    • wpinv_cleared_old_events
    • widget_getpaid_invoice
    • widget_recent-posts
    • wpinv_version
    • wpinv_flush_permalinks
    • gepaid_installed_on
    • wpinv_tax_rates
    • widget_wpinv_history
    • getpaid_flushed_rewrite_rules
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpinv-reports
    • > Notice in wp-content/plugins/invoicing/includes/api/class-getpaid-rest-date-based-controller.php+124
    A non well formed numeric value encountered

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
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/invoicing/vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php
    • > /wp-content/plugins/invoicing/templates/emails/wpinv-email-billing-details.php
    • > /wp-content/plugins/invoicing/templates/emails/wpinv-email-footer.php
    • > /wp-content/plugins/invoicing/templates/payment-forms/elements/protected.php
    • > /wp-content/plugins/invoicing/templates/emails/wpinv-email-header.php
  • 110× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/invoicing/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: stripe, payments, invoice, checkout form, payments form builder...

invoicing/invoicing.php Passed 13 tests

Analyzing the main PHP file in "Payment forms, Buy now buttons and Invoicing System | GetPaid" version 2.8.1
62 characters long description:
A lightweight and VAT compliant payments and invoicing plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected147,525 lines of code in 843 files:
LanguageFilesBlank linesComment linesLines of code
PHP45815,98024,50060,442
JavaScript388,3195,93944,859
Sass3155,3066,40326,040
PO File13,6334,3527,887
SVG90124,938
CSS131661591,781
C19718589
JSON100482
Markdown3860400
XML217267
m418032
C/C++ Header14128

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity20.15
▷ Minimum class complexity1.00
▷ Maximum class complexity540.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes255
▷ Abstract classes93.53%
▷ Concrete classes24696.47%
▷ Final classes10.41%
Methods2,368
▷ Static methods29212.33%
▷ Public methods2,10188.72%
▷ Protected methods1717.22%
▷ Private methods964.05%
Functions840
▷ Named functions82798.45%
▷ Anonymous functions131.55%
Constants76
▷ Global constants4559.21%
▷ Class constants3140.79%
▷ Public constants31100.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
9 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/Quotes-1-768x384.png63.14KB25.80KB▼ 59.14%
includes/images/t-image1.png6.14KB3.17KB▼ 48.31%
assets/images/ui-icons_333333_256x240.png3.62KB4.11KB0.00%
assets/images/ui-icons_21759b_256x240.png3.62KB4.11KB0.00%
assets/images/getpaid-logo.png4.60KB2.44KB▼ 46.99%