67% wc-place-order-without-payment

Code Review | Place Order Without Payment for WooCommerce

WordPress plugin Place Order Without Payment for WooCommerce scored67%from 54 tests.

About plugin

  • Plugin page: wc-place-order-wi...
  • Plugin version: 2.5.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 26, 2019
  • Latest release: Oct 13, 2023
  • Number of updates: 88
  • Update frequency: every 18.5 days
  • Top authors: nitin247 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /36,001 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.37MB] [CPU: ▲23.69ms] 75% from 4 tests

A check of server-side resources used by Place Order Without Payment for WooCommerce
Please take the time to fix the following items
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.37MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.18 ▲5.7260.51 ▲20.77
Dashboard /wp-admin9.20 ▲5.9068.40 ▲16.02
Posts /wp-admin/edit.php9.21 ▲5.8478.15 ▲31.87
Add New Post /wp-admin/post-new.php9.90 ▲4.01126.70 ▲28.19
Media Library /wp-admin/upload.php9.20 ▲5.9762.50 ▲29.76
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.2056.95

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 218 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
fs_accounts
widget_recent-posts
fs_active_plugins
db_upgraded
widget_theysaidso_widget
fs_debug_mode
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Place Order Without Payment for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲6813.92 ▼0.811.70 ▼0.1528.97 ▼16.41
Dashboard /wp-admin2,231 ▲545.62 ▼0.07104.69 ▲5.8340.37 ▼2.86
Posts /wp-admin/edit.php2,168 ▲682.82 ▲0.8752.76 ▲17.3238.94 ▲2.17
Add New Post /wp-admin/post-new.php1,549 ▲2123.26 ▲0.44639.62 ▲26.1852.17 ▼3.20
Media Library /wp-admin/upload.php1,434 ▲344.93 ▲0.78103.37 ▲8.2942.98 ▲1.57
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0982.2838.5926.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wc-place-order-without-payment/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • fs_accounts
    • fs_debug_mode
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_active_plugins

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-place-order-without-payment/templates/admin/footer.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/wc-place-order-without-payment/templates/admin/header.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wc-place-order-without-payment/templates/admin/header.php:11
    • > PHP Fatal error
      Trait 'WPOWP\\Inc\\Traits\\Get_Instance' not found in wp-content/plugins/wc-place-order-without-payment/inc/class-wpowp-front.php on line 15
    • > PHP Fatal error
      Trait 'WPOWP\\Inc\\Traits\\Get_Instance' not found in wp-content/plugins/wc-place-order-without-payment/inc/premium/class-wpowp-premium.php on line 15
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/wc-place-order-without-payment/templates/admin/header.php on line 5
    • > PHP Fatal error
      Trait 'WPOWP\\Inc\\Traits\\Get_Instance' not found in wp-content/plugins/wc-place-order-without-payment/inc/class-wpowp-admin.php on line 15
    • > PHP Fatal error
      Trait 'WPOWP\\Inc\\Traits\\Get_Instance' not found in wp-content/plugins/wc-place-order-without-payment/compatibility/class-wpowp-hpos.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wc-place-order-without-payment/templates/admin/header.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wc-place-order-without-payment/templates/admin/header.php:11
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/wc-place-order-without-payment/templates/admin/header.php on line 5

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wc-place-order-without-payment/wc-place-order-without-payment.php 85% from 13 tests

"Place Order Without Payment for WooCommerce" version 2.5.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected51,393 lines of code in 168 files:
LanguageFilesBlank linesComment linesLines of code
PHP1328,17417,58434,376
PO File137,4509,05716,530
JavaScript54260214
Markdown1680214
JSON10027
CSS150016
XML13016

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity82.80
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces5
Interfaces0
Traits1
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,301
▷ Static methods20015.37%
▷ Public methods90569.56%
▷ Protected methods171.31%
▷ Private methods37929.13%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants159
▷ Global constants11270.44%
▷ Class constants4729.56%
▷ Public constants47100.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/wc-place-order-without-payment.png7.50KB4.32KB▼ 42.41%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/wc-thanks-redirect.png6.32KB3.32KB▼ 47.43%