84% woo-direct-buy

Code Review | Easy direct buy for woocommerce

WordPress plugin Easy direct buy for woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-direct-buy
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.11-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 18, 2019
  • Latest release: May 26, 2021
  • Number of updates: 7
  • Update frequency: every 84.0 days
  • Top authors: jhaineymilevis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 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.02MB] [CPU: ▼4.95ms] Passed 4 tests

An overview of server-side resources used by Easy direct buy for woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.60 ▼7.26
Dashboard /wp-admin3.33 ▲0.0249.35 ▼1.14
Posts /wp-admin/edit.php3.38 ▲0.0251.69 ▼2.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.77 ▼9.38
Media Library /wp-admin/upload.php3.25 ▲0.0241.44 ▲2.85
Easy direct buy for woocommerce /wp-admin/options-general.php?page=edbfw-options3.2234.52

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy direct buy for woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.24 ▼0.111.89 ▼0.2643.34 ▼5.78
Dashboard /wp-admin2,202 ▲255.61 ▼0.0392.12 ▼4.4143.48 ▲3.25
Posts /wp-admin/edit.php2,104 ▲72.01 ▼0.0041.25 ▲1.3837.91 ▲2.77
Add New Post /wp-admin/post-new.php1,531 ▲522.92 ▲0.27685.86 ▲4.1462.53 ▲7.32
Media Library /wp-admin/upload.php1,404 ▲14.17 ▼0.0497.43 ▼8.7846.14 ▼0.22
Easy direct buy for woocommerce /wp-admin/options-general.php?page=edbfw-options7952.0028.2227.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-direct-buy/woo_direct_buy.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: directcheckout, marketplace, woocommerce, directbuy

woo-direct-buy/woo_direct_buy.php 85% from 13 tests

"Easy direct buy for woocommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-direct-buy.php" instead of "woo_direct_buy.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1312254

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected