94% add-payment-type-to-woocommerce-admin-email

Code Review | Add Payment Type To Woocommerce Admin Email

WordPress plugin Add Payment Type To Woocommerce Admin Email scored 94% from 54 tests.

About plugin

  • Plugin page: add-payment-type-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 5.9.2
  • First release: Jun 2, 2014
  • Latest release: Jun 2, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: borbismedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,085 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼292.32ms] Passed 4 tests

An overview of server-side resources used by Add Payment Type To Woocommerce Admin Email
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0167.40 ▲14.41
Dashboard /wp-admin3.41 ▲0.0032.88 ▼1.47
Posts /wp-admin/edit.php3.64 ▲0.0039.21 ▲2.85
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.70 ▼1,165.15
Media Library /wp-admin/upload.php3.30 ▼0.0024.95 ▼5.49

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Payment Type To Woocommerce Admin Email
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲1016.41 ▲0.595.74 ▲0.102.78 ▲0.01
Dashboard /wp-admin2,895 ▲346.42 ▲0.11116.01 ▼20.43153.99 ▼6.18
Posts /wp-admin/edit.php2,691 ▼33.43 ▼0.0161.51 ▲0.01143.99 ▲1.84
Add New Post /wp-admin/post-new.php1,661 ▼9117.24 ▼4.41521.63 ▲64.39172.36 ▲17.07
Media Library /wp-admin/upload.php1,698 ▼05.72 ▲0.00143.58 ▲3.54190.01 ▼1.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-payment-type-to-woocommerce-admin-email/plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration 96% 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
5 plugin tags: add payment type to admin email, ecommerce, admin email, woocommerce, payment type

add-payment-type-to-woocommerce-admin-email/plugin.php 92% from 13 tests

The entry point to "Add Payment Type To Woocommerce Admin Email" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("add-payment-type-to-woocommerce-admin-email.php" instead of "plugin.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
Good job! No executable or dangerous file extensions detected43 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File22234

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ 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