84% drip-payments

Code Review | Drip Payments

WordPress plugin Drip Payments scored84%from 54 tests.

About plugin

  • Plugin page: drip-payments
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2022
  • Latest release: May 30, 2023
  • Number of updates: 92
  • Update frequency: every 5.5 days
  • Top authors: usedrip (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /1,534 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
Installer ran successfully

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

Server-side resources used by Drip Payments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.10 ▼6.24
Dashboard /wp-admin3.31 ▲0.0044.78 ▼4.14
Posts /wp-admin/edit.php3.36 ▲0.0047.76 ▲4.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.13 ▲0.56
Media Library /wp-admin/upload.php3.23 ▲0.0032.43 ▲0.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Drip Payments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.361.59 ▼0.1339.66 ▼4.30
Dashboard /wp-admin2,209 ▲174.84 ▼0.10107.17 ▼15.1442.48 ▼3.95
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0340.54 ▲5.6036.14 ▲1.20
Add New Post /wp-admin/post-new.php1,538 ▲1723.28 ▼0.06591.70 ▼98.6262.10 ▲7.23
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0693.68 ▼13.5241.13 ▼1.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
Even though no errors were found, 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
Almost there! Just fix the following items
  • 62× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/drip-payments/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/drip-payments/vendor/guzzlehttp/psr7/src/UploadedFile.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drip-payments/src/DripExternalConfirmationEndpoint.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/drip-payments/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/drip-payments/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/drip-payments/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/drip-payments/vendor/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/drip-payments/vendor/guzzlehttp/promises/src/EachPromise.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/drip-payments/src/DripSingleProductBannerAndModal.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drip-payments/src/DripUpdateAdminOptions.php:69

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: bnpl, woocommerce, drip payments, drip, payments

drip-payments/drip-payments.php Passed 13 tests

The main PHP script in "Drip Payments" version 2.2.0 is automatically included on every request by WordPress
70 characters long description:
Forneça a Drip como opção de pagamento para pedidos do WooCommerce.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin33,559 lines of code in 189 files:
LanguageFilesBlank linesComment linesLines of code
PHP1512,5226,26828,463
Markdown141,13403,429
JSON12001,216
HTML3534319
YAML522391
XML10019
Dockerfile18010
make1409
Bourne Shell1203

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity16.37
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces14
Interfaces16
Traits2
Classes96
▷ Abstract classes00.00%
▷ Concrete classes96100.00%
▷ Final classes2425.00%
Methods783
▷ Static methods16521.07%
▷ Public methods63881.48%
▷ Protected methods40.51%
▷ Private methods14118.01%
Functions178
▷ Named functions7642.70%
▷ Anonymous functions10257.30%
Constants171
▷ Global constants4224.56%
▷ Class constants12975.44%
▷ Public constants129100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin