84% ds-woocommerce-order-email-export

Code Review | DS Woocommerce Order Email Export

WordPress plugin DS Woocommerce Order Email Export scored84%from 54 tests.

About plugin

  • Plugin page: ds-woocommerce-or...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Dec 26, 2016
  • Latest release: Dec 23, 2016
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: dswpsupport (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,850 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.00ms] Passed 4 tests

This is a short check of server-side resources used by DS Woocommerce Order Email Export
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0644.69 ▲5.04
Dashboard /wp-admin3.37 ▲0.0652.37 ▲1.64
Posts /wp-admin/edit.php3.42 ▲0.0647.91 ▼3.17
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.50 ▼5.29
Media Library /wp-admin/upload.php3.29 ▲0.0634.47 ▼1.17

Server storage [IO: ▲0.04MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for DS Woocommerce Order Email Export
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4513.28 ▼1.011.90 ▼0.4149.59 ▼1.89
Dashboard /wp-admin2,212 ▲355.74 ▲0.0797.07 ▼0.1041.88 ▲0.14
Posts /wp-admin/edit.php2,128 ▲252.25 ▲0.2935.99 ▼11.5831.04 ▼8.74
Add New Post /wp-admin/post-new.php1,545 ▲1723.18 ▲0.10692.34 ▲9.1741.07 ▼12.99
Media Library /wp-admin/upload.php1,420 ▲174.27 ▲0.0191.35 ▼14.7346.42 ▼1.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/ds-woocommerce-order-email-export/index.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/ds-woocommerce-order-email-export/index.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ds-woocommerce-order-email-export/index.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

ds-woocommerce-order-email-export/index.php 92% from 13 tests

Analyzing the main PHP file in "DS Woocommerce Order Email Export" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ds-woocommerce-order-email-export.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
There were no executable files found in this plugin687 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS23965386
PHP14955295
JavaScript1106

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods533.33%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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