79% factuursturen-integration

Code Review | Factuursturen integration

WordPress plugin Factuursturen integration scored79%from 54 tests.

About plugin

  • Plugin page: factuursturen-int...
  • Plugin version: 0.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: May 7, 2019
  • Latest release: May 16, 2022
  • Number of updates: 17
  • Update frequency: every 69.5 days
  • Top authors: twovisions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /880 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.19ms] Passed 4 tests

An overview of server-side resources used by Factuursturen integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4346.07 ▲1.90
Dashboard /wp-admin3.79 ▲0.4954.15 ▲2.42
Posts /wp-admin/edit.php3.84 ▲0.4954.76 ▼9.60
Add New Post /wp-admin/post-new.php6.37 ▲0.4998.25 ▼2.54
Media Library /wp-admin/upload.php3.72 ▲0.4941.83 ▲1.50
Factuursturen API /wp-admin/options-general.php?page=fsi_settings_api3.7539.39

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 265 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Factuursturen integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.53 ▼1.104.68 ▲2.6846.31 ▲2.69
Dashboard /wp-admin2,210 ▲314.84 ▼0.04111.63 ▲4.9642.04 ▼4.64
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0440.09 ▲3.6736.39 ▼2.79
Add New Post /wp-admin/post-new.php1,541 ▼222.88 ▲4.61695.47 ▲90.2252.27 ▼11.89
Media Library /wp-admin/upload.php1,395 ▲74.22 ▼0.1195.50 ▼5.3044.75 ▲0.46
Factuursturen API /wp-admin/options-general.php?page=fsi_settings_api9222.1722.5734.47

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/factuursturen-integration/factuursturen-integration.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/file.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/variable.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/threshold.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/multi.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/psr-0.php
    • > /wp-content/plugins/factuursturen-integration/modules/PronamicInvoices/config.php
    • > /wp-content/plugins/factuursturen-integration/modules/WoocommerceInvoices/config.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/levelbuffer.php
    • > /wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/default.php
  • 94× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'FSI\\RequestData\\ClientInterface' not found in wp-content/plugins/factuursturen-integration/src/RequestData/Client.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/factuursturen-integration/templates/admin/settings.php:2
    • > PHP Fatal error
      Trait 'FSI\\Module\\WoocommerceInvoices\\Util\\FactuursturenHelperTrait' not found in wp-content/plugins/factuursturen-integration/modules/WoocommerceInvoices/ActionHook/WoocommercePaymentComplete.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'FSI\\Controller\\AbstractController' not found in wp-content/plugins/factuursturen-integration/src/Controller/Admin/SettingsController.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/factuursturen-integration/vendor/guzzlehttp/promises/src/FulfilledPromise.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/factuursturen-integration/vendor/guzzlehttp/psr7/src/UploadedFile.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'MongoClient' not found in wp-content/plugins/factuursturen-integration/vendor/analog/analog/lib/Analog/Handler/Mongo.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'FSI\\RequestData\\InvoiceLineInterface' not found in wp-content/plugins/factuursturen-integration/src/RequestData/InvoiceLine.php:11
    • > PHP Fatal error
      Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in wp-content/plugins/factuursturen-integration/vendor/analog/analog/examples/amon.php on line 16
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/factuursturen-integration/vendor/guzzlehttp/promises/src/EachPromise.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: woocommerce, factuursturen, ideal, api, pronamic

factuursturen-integration/factuursturen-integration.php Passed 13 tests

"Factuursturen integration" version 0.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
106 characters long description:
Sending invoices after payment through Factuursturen.nl service. Compatible with Woocommerce and Pronamic.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin16,729 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PHP2172,8138,28012,399
Markdown141,06403,561
JSON900646
YAML28070
XML35244
make1409

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.06
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces30
Interfaces26
Traits7
Classes143
▷ Abstract classes96.29%
▷ Concrete classes13493.71%
▷ Final classes1511.19%
Methods1,108
▷ Static methods15614.08%
▷ Public methods96687.18%
▷ Protected methods292.62%
▷ Private methods11310.20%
Functions169
▷ Named functions5633.14%
▷ Anonymous functions11366.86%
Constants96
▷ Global constants88.33%
▷ Class constants8891.67%
▷ Public constants88100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin