68% servicebot

Code Review | Subscription Billing by Billflow

WordPress plugin Subscription Billing by Billflow scored68%from 54 tests.

About plugin

  • Plugin page: servicebot
  • Plugin version: 2.1.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Nov 18, 2019
  • Latest release: Aug 1, 2021
  • Number of updates: 48
  • Update frequency: every 13.0 days
  • Top authors: servicebot (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /2,806 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
This plugin's installer ran successfully

Server metrics [RAM: ▲1.62MB] [CPU: ▲0.91ms] Passed 4 tests

A check of server-side resources used by Subscription Billing by Billflow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.35 ▲1.8939.94 ▼0.62
Dashboard /wp-admin5.20 ▲1.9048.40 ▲0.09
Posts /wp-admin/edit.php5.25 ▲1.9050.99 ▲6.37
Add New Post /wp-admin/post-new.php6.67 ▲0.7991.85 ▲0.44
Media Library /wp-admin/upload.php5.12 ▲1.9039.02 ▲3.75
Billflow /wp-admin/admin.php?page=servicebot5.1236.53
Stripe Webhooks /wp-admin/admin.php?page=servicebot-stripe-webhooks5.1236.97
Setup Roles /wp-admin/admin.php?page=servicebot-setup-roles5.1237.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 180 new files
Database: no new tables, 10 new options
New WordPress options
widget_servicebot_pricing_page_widget
widget_recent-posts
widget_servicebot_signup_portal_widget
widget_theysaidso_widget
widget_recent-comments
widget_servicebot_subscription_portal_widget
widget_servicebot_billing_page_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Subscription Billing by Billflow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17813.67 ▼0.624.51 ▲2.6037.62 ▼11.87
Dashboard /wp-admin2,239 ▲485.79 ▲0.90112.44 ▼5.3370.62 ▲26.48
Posts /wp-admin/edit.php2,122 ▲361.99 ▼0.0133.39 ▲1.4135.40 ▲1.57
Add New Post /wp-admin/post-new.php1,545 ▲3122.92 ▲5.31660.31 ▼37.2951.34 ▼3.38
Media Library /wp-admin/upload.php1,415 ▲304.12 ▼0.0996.86 ▼4.2873.06 ▲29.04
Billflow /wp-admin/admin.php?page=servicebot9022.0225.4930.01
Stripe Webhooks /wp-admin/admin.php?page=servicebot-stripe-webhooks9702.0222.9734.42
Setup Roles /wp-admin/admin.php?page=servicebot-setup-roles8722.1524.1724.09

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
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_servicebot_billing_page_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_servicebot_subscription_portal_widget
    • widget_theysaidso_widget
    • widget_servicebot_pricing_page_widget
    • can_compress_scripts
    • db_upgraded
    • widget_servicebot_signup_portal_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/servicebot/public/stripe/update_certs.php
    • > /wp-content/plugins/servicebot/public/stripe/build.php
    • > /wp-content/plugins/servicebot/public/partials/servicebot-public-display.php
  • 117× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Dispute.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Coupon.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Review.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Radar/ValueListItem.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Radar/ValueList.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/CreditNote.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/servicebot/public/stripe/lib/Exception/SignatureVerificationException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Issuing/CardDetails.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/OrderReturn.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/servicebot/public/stripe/lib/Source.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: stripe, subscriptions, pricing page, subscription management, payments

servicebot/servicebot.php Passed 13 tests

The entry point to "Subscription Billing by Billflow" version 2.1.5 is a PHP file that has certain tags in its header comment area
98 characters long description:
Provides NO-CODE integration between WordPress and Billflow, an UI layer on top of Stripe Billing.

Code Analysis 5% from 3 tests

File types 0% from 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
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/servicebot/public/stripe/data/ca-certificates.crt
7,831 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1511,2825,0216,589
Markdown35980847
JavaScript552139280
JSON10048
CSS22847
make15017
YAML1003

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.20
Average class complexity4.35
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces12
Interfaces5
Traits7
Classes130
▷ Abstract classes86.15%
▷ Concrete classes12293.85%
▷ Final classes00.00%
Methods387
▷ Static methods15439.79%
▷ Public methods33987.60%
▷ Protected methods153.88%
▷ Private methods338.53%
Functions25
▷ Named functions1976.00%
▷ Anonymous functions624.00%
Constants610
▷ Global constants30.49%
▷ Class constants60799.51%
▷ Public constants607100.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
4 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/SB_FAVI 256x256.png11.42KB4.26KB▼ 62.73%
img/billflow-white-gradient.png2.16KB1.60KB▼ 25.95%
admin/img/signup-banner-icon.png117.45KB46.47KB▼ 60.44%
admin/img/stripe-verified-partner-logo.png6.05KB3.21KB▼ 46.97%