78% wh-kartra-billing

Code Review | WH Kartra Billing

WordPress plugin WH Kartra Billing scored78%from 54 tests.

About plugin

  • Plugin page: wh-kartra-billing
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2023
  • Latest release: Mar 14, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: officialwaashero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /313 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
Install script ran successfully

Server metrics [RAM: ▼0.63MB] [CPU: ▼15.39ms] Passed 4 tests

Server-side resources used by WH Kartra Billing
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.05 ▼1.88
Dashboard /wp-admin3.35 ▲0.0454.24 ▼0.38
Posts /wp-admin/edit.php3.46 ▲0.1055.47 ▼2.18
Add New Post /wp-admin/post-new.php3.23 ▼2.6538.46 ▼57.12
Media Library /wp-admin/upload.php3.27 ▲0.0441.44 ▲5.99

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 116 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WH Kartra Billing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.88 ▼0.918.12 ▲5.8148.12 ▲4.47
Dashboard /wp-admin2,215 ▲245.80 ▲0.75105.61 ▼36.2137.33 ▼18.55
Posts /wp-admin/edit.php2,103 ▲32.05 ▲0.0337.47 ▼0.2734.46 ▲0.88
Add New Post /wp-admin/post-new.php1,545 ▲1423.21 ▼0.11609.79 ▼18.5957.98 ▼3.52
Media Library /wp-admin/upload.php1,397 ▲34.30 ▲0.10101.05 ▼5.7146.27 ▼6.19

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wh-kartra-billing/public/partials/wh-kartra-billing-public-display.php
    • > /wp-content/plugins/wh-kartra-billing/admin/partials/wh-kartra-billing-admin-display.php
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Claim' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Claim/Basic.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\BaseSigner' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Signer/Hmac.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Claim\\Basic' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Validator' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Validation/Validator.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Exception' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Signer/Ecdsa/ConversionFailed.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Validation\\Constraint' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Validation/Constraint/ValidAt.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Lcobucci\\JWT\\Exception' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Encoding/CannotEncodeContent.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Ecdsa' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\OpenSSL' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Signer/Ecdsa.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Ecdsa' not found in wp-content/plugins/wh-kartra-billing/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("www.waashero.com")
You can take inspiration from this readme.txt

wh-kartra-billing/wh-kartra-billing.php Passed 13 tests

The entry point to "WH Kartra Billing" version 1.0.0 is a PHP file that has certain tags in its header comment area
43 characters long description:
Sync kartra billing actions with WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin4,808 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP971,3062,7734,281
CSS22311252
JSON320161
Markdown132060
JavaScript4126454

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.45
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces17
Interfaces10
Traits0
Classes72
▷ Abstract classes56.94%
▷ Concrete classes6793.06%
▷ Final classes2943.28%
Methods335
▷ Static methods5917.61%
▷ Public methods29186.87%
▷ Protected methods51.49%
▷ Private methods3911.64%
Functions20
▷ Named functions1470.00%
▷ Anonymous functions630.00%
Constants25
▷ Global constants14.00%
▷ Class constants2496.00%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin