83% sprout-invoices-wp-forms

Code Review | WP Forms + Sprout Invoices - Easy Invoice & Quote Submissions

WordPress plugin WP Forms + Sprout Invoices - Easy Invoice & Quote Submissions scored83%from 54 tests.

About plugin

  • Plugin page: sprout-invoices-w...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Aug 9, 2023
  • Number of updates: 19
  • Update frequency: every 105.7 days
  • Top authors: dancameron (57.89%)boldgrid (26.32%)avonville1 (21.05%)wvcody (10.53%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /9,764 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WP Forms + Sprout Invoices - Easy Invoice & Quote Submissions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.57 ▼0.68
Dashboard /wp-admin3.31 ▲0.0048.77 ▼4.03
Posts /wp-admin/edit.php3.36 ▲0.0047.24 ▲0.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.07 ▼9.86
Media Library /wp-admin/upload.php3.23 ▲0.0038.49 ▲1.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Forms + Sprout Invoices - Easy Invoice & Quote Submissions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.251.78 ▼0.0743.44 ▲1.90
Dashboard /wp-admin2,195 ▲185.61 ▲0.0388.25 ▼6.8539.08 ▼1.64
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0434.45 ▼1.4838.02 ▲1.22
Add New Post /wp-admin/post-new.php1,526 ▼2023.59 ▲5.07623.49 ▼42.1052.99 ▼17.83
Media Library /wp-admin/upload.php1,394 ▼64.14 ▼0.0896.06 ▼6.6042.74 ▼1.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'SI_Controller' not found in wp-content/plugins/sprout-invoices-wp-forms/inc/WPForms_Controller.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SI_WPForms_Controller' not found in wp-content/plugins/sprout-invoices-wp-forms/inc/SI_WPForms.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Settings overview)
Please take inspiration from this readme.txt

sprout-invoices-wp-forms/sprout-invoices-wpforms-integration.php 69% from 13 tests

The primary PHP file in "WP Forms + Sprout Invoices - Easy Invoice & Quote Submissions" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sprout-invoices-wp-forms.php" instead of "sprout-invoices-wpforms-integration.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin475 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36789369
PO File1202263
Bourne Shell1191143

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity38.50
▷ Minimum class complexity35.00
▷ Maximum class complexity42.00
Average method complexity5.69
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16100.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.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
1 PNG file occupies 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png193.16KB55.01KB▼ 71.52%