78% woo-email-admin-on-completed-order

Code Review | Woocommerce Email Admin On Completed Order

WordPress plugin Woocommerce Email Admin On Completed Order scored78%from 54 tests.

About plugin

  • Plugin page: woo-email-admin-o...
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 8, 2018
  • Latest release: Jul 9, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: un4saken (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Woocommerce Email Admin On Completed Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.89 ▼0.72
Dashboard /wp-admin3.31 ▲0.0155.96 ▲1.33
Posts /wp-admin/edit.php3.36 ▲0.0052.24 ▲2.48
Add New Post /wp-admin/post-new.php5.89 ▲0.00104.44 ▲7.11
Media Library /wp-admin/upload.php3.23 ▲0.0035.63 ▼0.43

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Email Admin On Completed Order
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.53 ▼0.882.11 ▲0.3044.11 ▼1.99
Dashboard /wp-admin2,221 ▲274.88 ▼1.00102.45 ▼4.5939.33 ▼5.69
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0241.71 ▲6.3734.64 ▼1.88
Add New Post /wp-admin/post-new.php1,545 ▼023.38 ▲0.26618.80 ▼75.2755.13 ▼2.17
Media Library /wp-admin/upload.php1,403 ▲64.43 ▲0.2597.08 ▼8.9946.34 ▼1.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-email-admin-on-completed-order/index.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-email-admin-on-completed-order/includes/function.php:4

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 uses markdown syntax to describe your plugin to the world
4 plugin tags: email, woocommerce, admin, order

woo-email-admin-on-completed-order/index.php 92% from 13 tests

"Woocommerce Email Admin On Completed Order" version 0.1'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: The principal plugin file should be the same as the plugin slug ("woo-email-admin-on-completed-order.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin14 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2171814

PHP code Passed 2 tests

Analyzing 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.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin