84% discontinued-product-for-woocommerce

Code Review | Discontinued Products for WooCommerce

WordPress plugin Discontinued Products for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: discontinued-prod...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2015
  • Latest release: Oct 16, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: vutran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,090 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
Installer ran successfully

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

A check of server-side resources used by Discontinued Products for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.52 ▲3.23
Dashboard /wp-admin3.32 ▲0.0147.83 ▼7.50
Posts /wp-admin/edit.php3.37 ▲0.0149.25 ▼1.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.68 ▼7.22
Media Library /wp-admin/upload.php3.24 ▲0.0139.26 ▼0.68

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Discontinued Products for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.012.08 ▲0.4354.29 ▲12.81
Dashboard /wp-admin2,195 ▲155.62 ▼0.0187.48 ▼4.9638.68 ▼3.95
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0435.16 ▲0.5937.11 ▼2.02
Add New Post /wp-admin/post-new.php1,526 ▼022.91 ▼0.17675.16 ▲19.6257.01 ▲3.67
Media Library /wp-admin/upload.php1,400 ▲34.10 ▼0.0795.66 ▼16.9041.31 ▼3.65

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/discontinued-product-for-woocommerce/discontinued-product-for-woocommerce.php:14

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: discontinued, products, inventory, shopping, e-commerce...

discontinued-product-for-woocommerce/discontinued-product-for-woocommerce.php Passed 13 tests

The main file in "Discontinued Products for WooCommerce" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
65 characters long description:
Adds the ability to flag a product as discontinued to WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin37 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP143637

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin