78% suppliers-manager-for-woocommerce

Code Review | Suppliers Manager for Woocommerce

WordPress plugin Suppliers Manager for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: suppliers-manager...
  • Plugin version: 0.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.1.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2017
  • Latest release: May 6, 2019
  • Number of updates: 27
  • Update frequency: every 20.4 days
  • Top authors: sebastiengregoire (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /6,387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Suppliers Manager for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.62 ▼4.93
Dashboard /wp-admin3.33 ▼0.0244.29 ▼13.14
Posts /wp-admin/edit.php3.38 ▲0.0247.64 ▲0.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.95 ▼15.27
Media Library /wp-admin/upload.php3.25 ▲0.0234.27 ▼3.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Suppliers Manager for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲6313.61 ▼0.764.82 ▲2.6540.36 ▼7.69
Dashboard /wp-admin2,209 ▲275.80 ▼0.0598.64 ▼6.5542.79 ▲0.31
Posts /wp-admin/edit.php2,098 ▲92.02 ▼0.0039.66 ▼1.7335.51 ▼1.14
Add New Post /wp-admin/post-new.php1,551 ▲1118.52 ▼4.99652.54 ▼26.2261.03 ▲4.82
Media Library /wp-admin/upload.php1,400 ▲154.29 ▲0.0597.53 ▼14.5343.82 ▼5.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/suppliers-manager-for-woocommerce/suppliers-manager-for-woocommerce.php
  • 7× 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/suppliers-manager-for-woocommerce/includes/supplier-post-type.class.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/suppliers-manager-for-woocommerce/includes/admin/menu.class.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/suppliers-manager-for-woocommerce/includes/admin/wc-products.class.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/suppliers-manager-for-woocommerce/includes/admin/settings.class.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/suppliers-manager-for-woocommerce/includes/admin/editor.class.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/suppliers-manager-for-woocommerce/includes/admin/wc-product.class.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'FT_SMFW_Supplier' not found in wp-content/plugins/suppliers-manager-for-woocommerce/includes/views/supplier-products.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: stock, woocommerce, supplying, supplier, shop...

suppliers-manager-for-woocommerce/suppliers-manager-for-woocommerce.php 77% from 13 tests

The entry point to "Suppliers Manager for Woocommerce" version 0.2.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 202 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "2.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,480 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP102132741,262
Sass1211533547
CSS22742408
PO File195126248
JavaScript11010
SVG5005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.67
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods108
▷ Static methods43.70%
▷ Public methods10698.15%
▷ Protected methods00.00%
▷ Private methods21.85%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/no_supplier.png4.61KB2.51KB▼ 45.47%