10% discount-feed-woocommerce

Code Review | Discount Feed WooCommerce

WordPress plugin Discount Feed WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: discount-feed-woo...
  • Plugin version: 1.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 5.8.1
  • First release: Aug 8, 2018
  • Latest release: Mar 4, 2021
  • Number of updates: 32
  • Update frequency: every 29.4 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 794 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/discount-feed-woocommerce/lib/class-discountfeedwoocommerce.php+450
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.23MB] [CPU: ▼142.38ms] Passed 4 tests

A check of server-side resources used by Discount Feed WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.02 ▲0.3035.15 ▲11.35
Dashboard /wp-admin3.25 ▲0.1946.26 ▼1.78
Posts /wp-admin/edit.php3.36 ▲0.2544.49 ▲2.67
Add New Post /wp-admin/post-new.php5.72 ▲0.2888.16 ▼567.89
Media Library /wp-admin/upload.php3.19 ▲0.1935.22 ▼2.53
Discount Feeds /wp-admin/edit.php?post_type=dcfeedwoo_product3.2335.76
Add New /wp-admin/post-new.php?post_type=dcfeedwoo_product5.7180.19

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 3 new options
New WordPress options
discount_feed_woocommerce_widget
widget_discountfeedwoocommercewidgetitem
discount_feed_woocommerce

Browser metrics Passed 4 tests

This is an overview of browser requirements for Discount Feed WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,742 ▲14616.36 ▲0.789.78 ▲0.4852.56 ▲1.77
Dashboard /wp-admin3,008 ▲775.97 ▲0.04136.10 ▼4.09121.77 ▼1.84
Posts /wp-admin/edit.php2,774 ▲352.71 ▼0.0263.36 ▼3.3390.52 ▼2.49
Add New Post /wp-admin/post-new.php1,695 ▼17718.81 ▼0.42363.22 ▼28.65107.64 ▼0.79
Media Library /wp-admin/upload.php1,845 ▲385.03 ▲0.00148.52 ▲0.07115.30 ▼1.74
Discount Feeds /wp-admin/edit.php?post_type=dcfeedwoo_product1,4532.6462.3278.51
Add New /wp-admin/post-new.php?post_type=dcfeedwoo_product5,67816.61426.52108.96

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_discountfeedwoocommercewidgetitem

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discount-feed-woocommerce/lib/class-discountfeedwoocommerce.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discount-feed-woocommerce/lib/class-discountfeedwoocommerceregist.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discount-feed-woocommerce/lib/class-discountfeedwoocommercewidgetitem.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discount-feed-woocommerce/lib/class-discountfeedwoocommerceregist.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discount-feed-woocommerce/lib/class-discountfeedwoocommerceadmin.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: feed, products, woocommerce, sale

discount-feed-woocommerce/discountfeedwoocommerce.php 85% from 13 tests

The principal PHP file in "Discount Feed WooCommerce" v. 1.13 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "3.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("discount-feed-woocommerce.php" instead of "discountfeedwoocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin747 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6175285747

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.25
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2074.07%
▷ Protected methods00.00%
▷ Private methods725.93%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin