84% supplier-and-purchase-order-management-for-woocommerce

Code Review | Supplier and Purchase Order Management for WooCommerce

WordPress plugin Supplier and Purchase Order Management for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: supplier-and-purc...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 3, 2022
  • Latest release: Mar 23, 2023
  • Number of updates: 14
  • Update frequency: every 16.7 days
  • Top authors: sunnysonic (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /1,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Supplier and Purchase Order Management for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.50 ▼3.80
Dashboard /wp-admin3.31 ▼0.0447.22 ▼17.94
Posts /wp-admin/edit.php3.36 ▲0.0050.68 ▲4.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.62 ▼10.90
Media Library /wp-admin/upload.php3.23 ▲0.0034.35 ▼0.30

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Supplier and Purchase Order Management for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.43 ▼0.211.76 ▼0.0446.23 ▲7.11
Dashboard /wp-admin2,206 ▲155.83 ▲0.9699.32 ▼6.3939.86 ▼6.82
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0148.45 ▲11.6637.59 ▲2.97
Add New Post /wp-admin/post-new.php1,533 ▲2023.41 ▲5.71725.14 ▲84.6259.02 ▲6.85
Media Library /wp-admin/upload.php1,388 ▼34.28 ▲0.0493.94 ▼5.3443.49 ▲0.86

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 33× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/recibirentregapo.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/listpos.php:6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/listsuppliers.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/poview.php on line 7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/addsupplier.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/createpurchaseorder.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/recibirentregapo.php on line 5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/editpurchaseorder.php on line 7
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/poview.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/supplier-and-purchase-order-management-for-woocommerce/views/listsuppliers.php:7

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, but this is not an exhaustive test

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: purchase order, woocommerce, supplier, purchase, management

supplier-and-purchase-order-management-for-woocommerce/supplier-plugin.php 92% from 13 tests

The primary PHP file in "Supplier and Purchase Order Management for WooCommerce" version 1.1.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("supplier-and-purchase-order-management-for-woocommerce.php" instead of "supplier-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected6,664 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PO File141,7922,0304,528
PHP117851592,136

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png35.04KB10.95KB▼ 68.75%
assets/icon-128x128.png14.30KB4.78KB▼ 66.60%