83% sprout-invoices-formidable-forms

Code Review | Formidable Forms + Sprout Invoices - Easy Invoice & Estimate Submissions

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

About plugin

  • Plugin page: sprout-invoices-f...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2018
  • Latest release: Aug 9, 2023
  • Number of updates: 20
  • Update frequency: every 100.4 days
  • Top authors: dancameron (55%)boldgrid (35%)avonville1 (20%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /9,622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Formidable Forms + Sprout Invoices - Easy Invoice & Estimate Submissions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.31 ▼1.98
Dashboard /wp-admin3.31 ▲0.0151.94 ▼3.98
Posts /wp-admin/edit.php3.36 ▲0.0054.11 ▼0.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.65 ▼1.18
Media Library /wp-admin/upload.php3.23 ▲0.0038.58 ▲0.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Formidable Forms + Sprout Invoices - Easy Invoice & Estimate Submissions: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.001.79 ▼0.1445.63 ▲1.71
Dashboard /wp-admin2,192 ▲155.56 ▼0.0584.84 ▼12.4640.40 ▼2.63
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0339.55 ▲3.5737.74 ▲3.03
Add New Post /wp-admin/post-new.php1,526 ▼123.11 ▲0.21666.20 ▲25.9050.35 ▼4.29
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.08103.87 ▲5.1449.29 ▲3.36

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'SI_Controller' not found in wp-content/plugins/sprout-invoices-formidable-forms/inc/Formidable_Submission.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SI_Formidable_Controller' not found in wp-content/plugins/sprout-invoices-formidable-forms/trunk/inc/Formidable.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SI_Formidable_Controller' not found in wp-content/plugins/sprout-invoices-formidable-forms/inc/Formidable.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SI_Controller' not found in wp-content/plugins/sprout-invoices-formidable-forms/trunk/inc/Formidable_Submission.php:3

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 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Form with pre-defined line items), #2 (Settings overview)
You can take inspiration from this readme.txt

sprout-invoices-formidable-forms/sprout-invoice-formidable-integration.php 69% from 13 tests

The main file in "Formidable Forms + Sprout Invoices - Easy Invoice & Estimate Submissions" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • 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-formidable-forms.php" instead of "sprout-invoice-formidable-integration.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin877 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5137171771
PO File1202263
Bourne Shell1191143

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods35100.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants428.57%
▷ Class constants1071.43%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.98MB with 0.71MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png213.63KB57.39KB▼ 73.13%
trunk/screenshot-1.png287.60KB83.27KB▼ 71.05%
screenshot-1.png287.60KB83.27KB▼ 71.05%
trunk/screenshot-2.png213.63KB57.39KB▼ 73.13%