78% supplier-order-email

Code Review | Supplier Order Email

WordPress plugin Supplier Order Email scored78%from 54 tests.

About plugin

  • Plugin page: supplier-order-email
  • Plugin version: 3.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Jul 18, 2020
  • Latest release: Nov 28, 2023
  • Number of updates: 260
  • Update frequency: every 4.7 days
  • Top authors: mcidesarrollo (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

300+ active /14,676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▲0.93ms] Passed 4 tests

A check of server-side resources used by Supplier Order Email
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3344.74 ▲4.64
Dashboard /wp-admin3.70 ▲0.3951.65 ▲2.53
Posts /wp-admin/edit.php3.75 ▲0.3951.95 ▲2.92
Add New Post /wp-admin/post-new.php6.26 ▲0.37100.16 ▼6.39
Media Library /wp-admin/upload.php3.56 ▲0.3340.17 ▲5.24

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 405 new files
Database: no new tables, 40 new options
New WordPress options
mcisoe_show_ean
mcisoe_show_weight
mcisoe_show_order_number
mcisoe_new_structure_2_0
mcisoe_company_info
mcisoe_show_product_attributes
mcisoe_store_pdf
mcisoe_email_subject
mcisoe_show_product_meta
mcisoe_delete_all_data
...

Browser metrics Passed 4 tests

A check of browser resources used by Supplier Order Email
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6414.23 ▼0.531.79 ▲0.2244.97 ▲1.64
Dashboard /wp-admin2,213 ▲325.55 ▼0.1288.65 ▼15.4036.37 ▼6.42
Posts /wp-admin/edit.php2,124 ▲272.11 ▲0.1039.71 ▲2.4634.33 ▲0.25
Add New Post /wp-admin/post-new.php1,547 ▲2123.01 ▼0.39608.01 ▼43.8259.99 ▲13.65
Media Library /wp-admin/upload.php1,418 ▲184.20 ▲0.0498.30 ▲4.0138.90 ▼4.49

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 detected upon uninstall: 40 options
    • mcisoe_company_info
    • widget_recent-posts
    • mcisoe_show_product_img
    • mcisoe_email_copy
    • widget_recent-comments
    • mcisoe_show_price_items
    • mcisoe_special_meta
    • mcisoe_product_img_width
    • mcisoe_from_email
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/supplier-order-email/vendor/masterminds/html5/bin/entities.php
  • 129× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Frame' not found in wp-content/plugins/supplier-order-email/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/supplier-order-email/vendor/dompdf/dompdf/src/Positioner/TableCell.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/supplier-order-email/vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/supplier-order-email/vendor/phenx/php-font-lib/src/FontLib/EOT/File.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/supplier-order-email/vendor/dompdf/dompdf/src/FrameDecorator/Block.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/supplier-order-email/vendor/sabberworm/php-css-parser/src/Value/CSSString.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\Header' not found in wp-content/plugins/supplier-order-email/vendor/phenx/php-font-lib/src/FontLib/WOFF/Header.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\RuleSet\\RuleSet' not found in wp-content/plugins/supplier-order-email/vendor/sabberworm/php-css-parser/src/RuleSet/AtRuleSet.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/supplier-order-email/vendor/sabberworm/php-css-parser/src/Property/Charset.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/supplier-order-email/vendor/dompdf/dompdf/src/Positioner/Absolute.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: suppliers, order email, emails de pedido, order, orders emails...

supplier-order-email/supplier-order-email.php 92% from 13 tests

The entry point to "Supplier Order Email" version 3.4.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected47,008 lines of code in 276 files:
LanguageFilesBlank linesComment linesLines of code
PHP2479,34516,79543,571
Markdown1139001,314
CSS510855956
JSON900635
PO File1139159413
JavaScript1495794
HTML10017
SVG1008

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.40
Average class complexity28.89
▷ Minimum class complexity1.00
▷ Maximum class complexity809.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity97.00
Code structure
Namespaces37
Interfaces9
Traits0
Classes228
▷ Abstract classes125.26%
▷ Concrete classes21694.74%
▷ Final classes00.00%
Methods2,339
▷ Static methods1375.86%
▷ Public methods1,85979.48%
▷ Protected methods40217.19%
▷ Private methods783.33%
Functions36
▷ Named functions38.33%
▷ Anonymous functions3391.67%
Constants226
▷ Global constants125.31%
▷ Class constants21494.69%
▷ Public constants20997.66%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/arrow_up.png0.37KB0.40KB0.00%
vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%
admin/img/screenshot-1.png108.22KB33.85KB▼ 68.72%