83% bob-pay

Code Review | Bob Pay Plugin

WordPress plugin Bob Pay Plugin scored83%from 54 tests.

About plugin

  • Plugin page: bob-pay
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2023
  • Latest release: Jul 28, 2023
  • Number of updates: 8
  • Update frequency: every 20.5 days
  • Top authors: bobgroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Bob Pay Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.87 ▼1.28
Dashboard /wp-admin3.31 ▲0.0148.99 ▼6.01
Posts /wp-admin/edit.php3.36 ▲0.0052.55 ▼1.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.58 ▼7.98
Media Library /wp-admin/upload.php3.23 ▲0.0044.21 ▲2.83

Server storage [IO: ▲1.99MB] [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: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Bob Pay Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.231.67 ▼0.1944.50 ▼1.41
Dashboard /wp-admin2,218 ▲215.83 ▼0.08103.56 ▼7.0538.38 ▼5.43
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0537.80 ▼0.8738.96 ▲2.83
Add New Post /wp-admin/post-new.php1,526 ▼517.49 ▼5.64654.12 ▲1.7557.52 ▼5.91
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.13115.05 ▼4.2050.66 ▲0.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/bob-pay/includes/class-wc-bobpay-plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/bob-pay/includes/class-wc-bobpay-plugin-blocks-support.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
3 plugin tags: credit card, woocommerce, payment request

bob-pay/bobpay-plugin.php 85% from 13 tests

This is the main PHP file of "Bob Pay Plugin" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bob-pay.php" instead of "bobpay-plugin.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0.0" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected621 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP411425602
YAML14319

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.00
▷ Minimum class complexity4.00
▷ Maximum class complexity53.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods33
▷ Static methods13.03%
▷ Public methods3193.94%
▷ Protected methods26.06%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 1.95MB with 1.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/icon-128x128.png14.29KB2.53KB▼ 82.30%
.wordpress-org/screenshot-3.png223.70KB80.16KB▼ 64.16%
.wordpress-org/screenshot-6.png231.56KB79.85KB▼ 65.51%
assets/images/icon.png2.02KB1.79KB▼ 11.72%
.wordpress-org/screenshot-8.png214.20KB74.37KB▼ 65.28%