79% pricewell

Code Review | PriceWell Subscription Billing for Stripe

WordPress plugin PriceWell Subscription Billing for Stripe scored79%from 54 tests.

About plugin

  • Plugin page: pricewell
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Apr 13, 2022
  • Latest release: Apr 13, 2022
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: pricewel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /191 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by PriceWell Subscription Billing for Stripe
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.18 ▼4.60
Dashboard /wp-admin3.31 ▲0.0147.49 ▲0.50
Posts /wp-admin/edit.php3.36 ▲0.0145.63 ▼0.08
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.82 ▲1.90
Media Library /wp-admin/upload.php3.24 ▲0.0136.23 ▼0.34

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PriceWell Subscription Billing for Stripe
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.68 ▼0.697.35 ▲5.8639.34 ▼0.88
Dashboard /wp-admin2,210 ▲254.81 ▼0.0696.97 ▼13.2837.80 ▼5.37
Posts /wp-admin/edit.php2,093 ▲72.01 ▲0.0133.89 ▼3.2332.81 ▼2.88
Add New Post /wp-admin/post-new.php1,522 ▼1123.23 ▼0.07649.72 ▼34.5462.55 ▲6.33
Media Library /wp-admin/upload.php1,386 ▲14.25 ▼0.0397.63 ▼7.0743.02 ▼2.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pricewell/public/partials/pricewell-public-display.php
    • > /wp-content/plugins/pricewell/admin/partials/pricewell-admin-display.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pricewell/public/class-customer-portal.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pricewell/public/class-pricing-page.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: stripe, pricing page, payments, subscriptions, subscription management

pricewell/pricewell.php Passed 13 tests

The main PHP script in "PriceWell Subscription Billing for Stripe" version 1.0.0 is automatically included on every request by WordPress
112 characters long description:
Integrate Stripe Billing into WordPress without any coding. Pricing Tables, Checkout, Customer Portal, and more.

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
Good job! No executable or dangerous file extensions detected206 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14130537200
JavaScript24546
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
1.png86.17KB30.63KB▼ 64.45%
2.png80.66KB30.11KB▼ 62.68%