10% billplz-for-contact-form-7

Code Review | Billplz Addon for Contact Form 7

WordPress plugin Billplz Addon for Contact Form 7 scored10%from 54 tests.

About plugin

  • Plugin page: billplz-for-conta...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2022
  • Latest release: Dec 25, 2022
  • Number of updates: 7
  • Update frequency: every 16.0 days
  • Top authors: alvindcaesar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /716 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▼0.16MB] [CPU: ▼18.50ms] Passed 4 tests

A check of server-side resources used by Billplz Addon for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0237.82 ▼1.33
Dashboard /wp-admin3.22 ▼0.1229.88 ▼29.12
Posts /wp-admin/edit.php3.28 ▼0.0734.82 ▼15.09
Add New Post /wp-admin/post-new.php5.47 ▼0.4167.48 ▼25.44
Media Library /wp-admin/upload.php3.23 ▼0.0030.95 ▼4.36

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: 1 new table, 8 new options
New tables
wp_bcf7_payment
New WordPress options
widget_recent-posts
recovery_mode_email_last_sent
bcf7_general_settings
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Billplz Addon for Contact Form 7: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /811 ▼1,92412.38 ▼2.200.95 ▼0.7616.11 ▼27.27
Dashboard /wp-admin504 ▼1,6841.38 ▼3.5212.93 ▼98.2318.28 ▼27.45
Posts /wp-admin/edit.php502 ▼1,5871.35 ▼0.686.45 ▼29.4716.95 ▼20.75
Add New Post /wp-admin/post-new.php453 ▼1,0611.73 ▼15.7818.58 ▼645.737.11 ▼45.70
Media Library /wp-admin/upload.php512 ▼8761.73 ▼2.5422.97 ▼76.6220.10 ▼23.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_bcf7_payment
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • db_upgraded
    • bcf7_general_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(BCF7_PLUGIN_PATHincludes/lib/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/billplz-for-contact-form-7/includes/admin/class-billplz-cf7-payment-list-table.php on line 3
    • > PHP Warning
      Use of undefined constant BCF7_PLUGIN_PATH - assumed 'BCF7_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/billplz-for-contact-form-7/includes/admin/class-billplz-cf7-payment-list-table.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'BCF7_PLUGIN_PATHincludes/lib/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/billplz-for-contact-form-7/includes/admin/class-billplz-cf7-payment-list-table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/billplz-for-contact-form-7/includes/views/general-settings-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/billplz-for-contact-form-7/includes/views/api-settings-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/billplz-for-contact-form-7/includes/views/page-callback.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 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: e-commerce, payment-forms, payment-gateway, subscription, product

billplz-for-contact-form-7/billplz-for-cf7.php 77% from 13 tests

The main PHP script in "Billplz Addon for Contact Form 7" version 1.0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("billplz-for-contact-form-7.php" instead of "billplz-for-cf7.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,626 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP183626221,626

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity18.62
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods101
▷ Static methods1413.86%
▷ Public methods7271.29%
▷ Protected methods2221.78%
▷ Private methods76.93%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin