83% vmi-direct-checkout

Code Review | Buy Now Woocommerce

WordPress plugin Buy Now Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: vmi-direct-checkout
  • Plugin version: 3.0.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2021
  • Latest release: Sep 19, 2023
  • Number of updates: 42
  • Update frequency: every 23.2 days
  • Top authors: sharjeelkhanvmi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,117 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.03MB] [CPU: ▼2.94ms] Passed 4 tests

Analyzing server-side resources used by Buy Now Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.01 ▲3.60
Dashboard /wp-admin3.34 ▲0.0453.98 ▼0.88
Posts /wp-admin/edit.php3.39 ▲0.0452.93 ▼0.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.20 ▼10.08
Media Library /wp-admin/upload.php3.26 ▲0.0337.49 ▼0.30

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
dirctcheckoutvmi_buttontext
widget_recent-posts
dirctcheckoutvmi_bgcolor
theysaidso_admin_options
widget_theysaidso_widget
dirctcheckoutvmi_cartHide
db_upgraded
widget_recent-comments
dirctcheckoutvmi_textcolor
...

Browser metrics Passed 4 tests

An overview of browser requirements for Buy Now Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.24 ▼0.031.88 ▲0.0543.11 ▼2.29
Dashboard /wp-admin2,209 ▲325.65 ▲0.0695.61 ▼6.8037.80 ▼10.24
Posts /wp-admin/edit.php2,111 ▲81.96 ▼0.0340.45 ▼5.2337.05 ▼2.47
Add New Post /wp-admin/post-new.php1,546 ▲2018.32 ▼4.68647.52 ▲8.5168.43 ▲14.63
Media Library /wp-admin/upload.php1,411 ▲114.23 ▲0.0599.91 ▲2.7043.66 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 11 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • dirctcheckoutvmi_buybtn
    • widget_theysaidso_widget
    • dirctcheckoutvmi_cartHide
    • dirctcheckoutvmi_buttontext
    • dirctcheckoutvmi_textcolor
    • ...

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vmi-direct-checkout/wc-direct-checkout-vmi.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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
You can take inspiration from this readme.txt

vmi-direct-checkout/wc-direct-checkout-vmi.php 85% from 13 tests

"Buy Now Woocommerce" version 3.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("vmi-direct-checkout.php" instead of "wc-direct-checkout-vmi.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected347 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24818186
CSS145161

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png44.82KB22.79KB▼ 49.15%