84% wc-add-payment-type-to-admin-email

Code Review | WC Add Payment Type to Admin Email

WordPress plugin WC Add Payment Type to Admin Email scored84%from 54 tests.

About plugin

  • Plugin page: wc-add-payment-ty...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2017
  • Latest release: Apr 9, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Gagan Tiwari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.55ms] Passed 4 tests

This is a short check of server-side resources used by WC Add Payment Type to Admin Email
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.48 ▼9.00
Dashboard /wp-admin3.31 ▲0.0146.37 ▼5.86
Posts /wp-admin/edit.php3.36 ▲0.0049.34 ▲1.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.45 ▼8.72
Media Library /wp-admin/upload.php3.23 ▲0.0037.27 ▼2.63

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

A short overview of filesystem and database impact
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
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WC Add Payment Type to Admin Email
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.62 ▲0.251.65 ▼0.0138.18 ▼9.89
Dashboard /wp-admin2,195 ▲305.63 ▲0.0599.71 ▲8.3044.54 ▲1.81
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0139.72 ▲2.4636.32 ▼0.40
Add New Post /wp-admin/post-new.php1,526 ▼223.00 ▼0.03640.24 ▼25.7157.03 ▲2.13
Media Library /wp-admin/upload.php1,403 ▲64.25 ▼0.00104.23 ▲0.1343.01 ▼3.03

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 were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
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_action() in wp-content/plugins/wc-add-payment-type-to-admin-email/plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: payment type, ecommerce, woocommerce admin email, admin email, add payment type to admin email

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

This is the main PHP file of "WC Add Payment Type to Admin Email" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-add-payment-type-to-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 detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1298

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected