84% caldera-forms-sprout-invoices-integration

Code Review | Caldera Forms - Sprout Invoices Integration

WordPress plugin Caldera Forms - Sprout Invoices Integration scored84%from 54 tests.

About plugin

  • Plugin page: caldera-forms-spr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 6.3.1
  • First release: Sep 14, 2014
  • Latest release: Sep 14, 2014
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: Desertsnowman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,358 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.01MB] [CPU: ▼7.44ms] Passed 4 tests

Server-side resources used by Caldera Forms - Sprout Invoices Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.40 ▼2.81
Dashboard /wp-admin3.31 ▼0.0347.73 ▼16.37
Posts /wp-admin/edit.php3.36 ▲0.0049.94 ▲1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.07 ▼10.90
Media Library /wp-admin/upload.php3.23 ▲0.0037.30 ▲0.33

Server storage [IO: ▲0.11MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Caldera Forms - Sprout Invoices Integration: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.191.64 ▼0.3042.05 ▼0.51
Dashboard /wp-admin2,192 ▲125.54 ▼0.0986.48 ▼11.8139.22 ▼5.26
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0434.32 ▼2.0729.69 ▼8.65
Add New Post /wp-admin/post-new.php1,526 ▼222.90 ▼0.16677.80 ▲18.0453.15 ▼5.61
Media Library /wp-admin/upload.php1,403 ▲64.18 ▼0.15110.39 ▼0.9547.60 ▼0.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/caldera-forms-sprout-invoices-integration/config-client.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/caldera-forms-sprout-invoices-integration/config.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/caldera-forms-sprout-invoices-integration/meta.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/caldera-forms-sprout-invoices-integration/cf-sprout-invoice.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

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
4 plugin tags: estimate form, form integration, invoice, sprout invoices

caldera-forms-sprout-invoices-integration/cf-sprout-invoice.php 92% from 13 tests

The primary PHP file in "Caldera Forms - Sprout Invoices Integration" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("caldera-forms-sprout-invoices-integration.php" instead of "cf-sprout-invoice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin522 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47959416
CSS1196106

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/sproutapps.png88.03KB20.75KB▼ 76.43%