84% wc-direct-place-order-without-payment

Code Review | WC Direct Place Order Without Payment

WordPress plugin WC Direct Place Order Without Payment scored84%from 54 tests.

About plugin

  • Plugin page: wc-direct-place-o...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2017
  • Latest release: Apr 3, 2017
  • Number of updates: 11
  • Update frequency: every 2.5 days
  • Top authors: Gagan Tiwari (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /6,153 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by WC Direct Place Order Without Payment
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.45 ▲0.63
Dashboard /wp-admin3.31 ▼0.0449.05 ▼18.32
Posts /wp-admin/edit.php3.36 ▲0.0048.89 ▼5.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.88 ▼7.17
Media Library /wp-admin/upload.php3.23 ▲0.0037.09 ▲3.25

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WC Direct Place Order Without Payment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.491.99 ▲0.0443.01 ▼6.76
Dashboard /wp-admin2,195 ▲215.56 ▼0.1095.50 ▼3.1642.30 ▼3.20
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0234.68 ▼8.8532.72 ▼0.32
Add New Post /wp-admin/post-new.php1,528 ▼923.12 ▲5.02673.10 ▲20.5057.42 ▼10.92
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.1097.01 ▼6.1850.15 ▲4.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-direct-place-order-without-payment/wc-direct-place-order.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: You can take inspiration from this readme.txt

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

The entry point to "WC Direct Place Order Without Payment" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-direct-place-order-without-payment.php" instead of "wc-direct-place-order.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15132

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin