84% 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 84% 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: 6.3.1
  • 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,252 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Add Payment Type To Woocommerce Admin Email
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.11 ▼4.20
Dashboard /wp-admin3.31 ▲0.0141.68 ▼7.58
Posts /wp-admin/edit.php3.36 ▲0.0143.73 ▼5.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.58 ▼18.33
Media Library /wp-admin/upload.php3.23 ▲0.0134.89 ▲3.26

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Payment Type To Woocommerce Admin Email
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.371.70 ▼0.2040.45 ▼2.05
Dashboard /wp-admin2,209 ▲185.91 ▲1.04108.21 ▲5.9839.51 ▼5.51
Posts /wp-admin/edit.php2,089 ▼02.17 ▲0.1239.61 ▼2.2033.89 ▼0.82
Add New Post /wp-admin/post-new.php1,542 ▲918.33 ▼4.98610.77 ▲5.8460.00 ▲10.99
Media Library /wp-admin/upload.php1,391 ▲94.22 ▲0.0095.45 ▼4.1840.47 ▼2.28

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | 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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: add payment type to admin email, payment type, ecommerce, woocommerce, admin email

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

"Add Payment Type To Woocommerce Admin Email" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin43 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File22234
PHP1299

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
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
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%
Functions1
▷ Named functions1100.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