77% online-billing-service

Code Review | online billing service-woocommerce

WordPress plugin online billing service-woocommerce scored77%from 54 tests.

About plugin

  • Plugin page: online-billing-se...
  • Plugin version: 1.4.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Jan 7, 2021
  • Latest release: Aug 23, 2023
  • Number of updates: 58
  • Update frequency: every 16.5 days
  • Top authors: onlinebilling (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,122 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by online billing service-woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.28 ▼7.98
Dashboard /wp-admin3.31 ▼0.0446.27 ▼19.56
Posts /wp-admin/edit.php3.36 ▲0.0048.01 ▼4.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.21 ▼9.61
Media Library /wp-admin/upload.php3.23 ▲0.0047.77 ▲10.86

Server storage [IO: ▲0.35MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 52 new files
Database: 5 new tables, 6 new options
New tables
wp_wc_obs_api_key
wp_wc_obs_invoicing
wp_wc_obs_settings
wp_wc_obs_exchange_rates
REWSAKSDNSFFQYUFHALNOMKNEPZIOPLW
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for online billing service-woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.171.89 ▲0.0440.95 ▼5.20
Dashboard /wp-admin2,206 ▲154.85 ▼1.02106.17 ▲0.8839.04 ▲0.48
Posts /wp-admin/edit.php2,086 ▼62.04 ▼0.0135.49 ▼5.5332.54 ▼3.58
Add New Post /wp-admin/post-new.php1,542 ▼018.42 ▲0.37647.83 ▲18.9756.58 ▼11.49
Media Library /wp-admin/upload.php1,391 ▲64.17 ▼0.05106.91 ▼8.8246.45 ▲2.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/online-billing-service/public/partials/obs-public-display.php
  • 25× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/online-billing-service/admin/partials/obs-admin-display-invoices-table.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function paginate_links() in wp-content/plugins/online-billing-service/admin/partials/obs-admin-display-invoices-table.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/online-billing-service/admin/models/obs-initializers.php:3
    • > PHP Warning
      include_once(class-f4-admin-authentication.php): failed to open stream: No such file or directory in wp-content/plugins/online-billing-service/src_f4_woocommerce/admin/class-f4-admin-query.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/online-billing-service/admin/partials/obs-admin-redirect-to-obs.php:17
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/online-billing-service/admin/partials/obs-admin-settings-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/online-billing-service/admin/partials/obs-admin-settings-form-default.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/online-billing-service/admin/models/obs-initializers.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/online-billing-service/admin/partials/obs-admin-settings-form-stripe.php:5
    • > PHP Warning
      include_once(): Failed opening 'class-f4-admin-authentication.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/online-billing-service/src_f4_woocommerce/admin/class-f4-admin-query.php on line 24

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 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #2, #0 in online-billing-service/assets to your readme.txt
  • Screenshots: Add an image for screenshot #1 (Homepage of plugin.)
Please take inspiration from this readme.txt

online-billing-service/obs.php 85% from 13 tests

The main PHP script in "online billing service-woocommerce" version 1.4.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("online-billing-service.php" instead of "obs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,587 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP337008453,266
Ruby33115127
JavaScript22554125
CSS214969

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity27.89
▷ Minimum class complexity1.00
▷ Maximum class complexity133.00
Average method complexity5.41
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods116
▷ Static methods7665.52%
▷ Public methods11195.69%
▷ Protected methods00.00%
▷ Private methods54.31%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo-obs.png31.43KB11.31KB▼ 64.00%
admin/images/logo-f4.png3.72KB2.04KB▼ 45.23%