10% botpay

Code Review | BotPay

WordPress plugin BotPay scored 10% from 54 tests.

About plugin

  • Plugin page: botpay
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8.1
  • WordPress version: 5.8.1
  • First release: Oct 13, 2021
  • Latest release: Oct 27, 2021
  • Number of updates: 7
  • Update frequency: every 2.7 days
  • Top authors: lukaszturczyn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 60 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'KODA\TPay_Plugin\PluginLoader' does not have a method 'create_user'

Server metrics [RAM: ▲0.02MB] [CPU: ▼137.18ms] Passed 4 tests

This is a short check of server-side resources used by BotPay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.18 ▲0.4644.49 ▲22.14
Dashboard /wp-admin3.43 ▲0.3761.88 ▲11.12
Posts /wp-admin/edit.php3.47 ▲0.3659.77 ▲14.83
Add New Post /wp-admin/post-new.php4.45 ▼0.9864.48 ▼589.37
Media Library /wp-admin/upload.php3.31 ▲0.3149.16 ▲14.70

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 2 new options
New WordPress options
settings_api
settings_form

Browser metrics Passed 4 tests

BotPay: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲13115.84 ▼0.187.90 ▲0.4245.90 ▲0.17
Dashboard /wp-admin2,992 ▲555.86 ▼0.15137.25 ▼12.49115.39 ▼4.14
Posts /wp-admin/edit.php2,761 ▲252.70 ▲0.0070.09 ▲2.0992.26 ▼10.54
Add New Post /wp-admin/post-new.php1,698 ▲1518.44 ▲0.47402.37 ▲42.30113.01 ▼0.99
Media Library /wp-admin/upload.php1,829 ▲225.01 ▲0.00158.09 ▼0.79122.24 ▼6.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method KODA\TPay_Plugin\PluginLoader::uninstall() should not be called statically

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: A description for screenshot #1 is required in botpay/assets to your readme.txt
The official readme.txt is a good inspiration

botpay/botpay.php Passed 13 tests

The main PHP file in "BotPay" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
101 characters long description:
Prosty i szybki chatbot dla Messengera z integracją płatności TPay oraz Twoim sklepem Woocommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,320 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP205525841,823
JSON310386
PO File14343111
CSS1050

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.08
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes325.00%
Methods118
▷ Static methods1411.86%
▷ Public methods11597.46%
▷ Protected methods00.00%
▷ Private methods32.54%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants11
▷ Global constants11100.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
No PNG images were found in this plugin