84% payer-b2b-for-woocommerce

Code Review | Payer B2B for WooCommerce

WordPress plugin Payer B2B for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: payer-b2b-for-woo...
  • Plugin version: 2.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 16, 2020
  • Latest release: Nov 29, 2022
  • Number of updates: 32
  • Update frequency: every 32.8 days
  • Top authors: payertech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,474 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.25ms] Passed 4 tests

An overview of server-side resources used by Payer B2B for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0726.03 ▼11.75
Dashboard /wp-admin3.32 ▲0.0147.20 ▼0.23
Posts /wp-admin/edit.php3.37 ▲0.0141.31 ▼6.03
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.70 ▼13.69
Media Library /wp-admin/upload.php3.24 ▲0.0134.08 ▼1.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Payer B2B for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,458 ▼30314.32 ▼0.040.67 ▼0.7919.07 ▼19.96
Dashboard /wp-admin2,202 ▲305.61 ▼0.0098.29 ▲2.0640.71 ▼2.09
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0835.44 ▼2.2833.33 ▼4.21
Add New Post /wp-admin/post-new.php1,530 ▲223.22 ▲0.12623.10 ▼119.7765.77 ▲8.45
Media Library /wp-admin/upload.php1,401 ▼24.16 ▼0.01100.36 ▼13.5443.86 ▲0.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_print_notices() in wp-content/plugins/payer-b2b-for-woocommerce/templates/payer-checkout.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/payer-b2b-for-woocommerce/classes/class-pb2b-address-filter.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/payer-b2b-for-woocommerce/includes/pb2b-functions.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/payer-b2b-for-woocommerce/classes/class-pb2b-user-column.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: checkout, ecommerce, woocommerce, payer, e-commerce

payer-b2b-for-woocommerce/payer-b2b-for-woocommerce.php 92% from 13 tests

The primary PHP file in "Payer B2B for WooCommerce" version 2.3.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected3,468 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP475391,5733,143
JavaScript2267209
CSS22315116

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.33
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods170
▷ Static methods2715.88%
▷ Public methods16898.82%
▷ Protected methods00.00%
▷ Private methods21.18%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin