74% hide-related-products

Code Review | Hide Related Products in WooCommerce

WordPress plugin Hide Related Products in WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: hide-related-prod...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 28, 2019
  • Latest release: Aug 28, 2019
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: shama14 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /998 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.39ms] Passed 4 tests

An overview of server-side resources used by Hide Related Products in WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.71 ▲1.56
Dashboard /wp-admin3.31 ▼0.0351.80 ▼14.57
Posts /wp-admin/edit.php3.36 ▲0.0148.72 ▲3.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.69 ▼10.91
Media Library /wp-admin/upload.php3.24 ▲0.0134.68 ▲2.37

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide Related Products in WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.094.48 ▲2.7039.47 ▼4.14
Dashboard /wp-admin2,206 ▲185.88 ▲0.90109.48 ▲4.1136.57 ▼5.29
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0538.89 ▲3.1834.83 ▲2.66
Add New Post /wp-admin/post-new.php1,533 ▲1423.28 ▼0.10642.54 ▲21.9360.06 ▲7.51
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.0796.22 ▼1.0645.03 ▲3.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/hide-related-products/Hide-Related-Product.php+23
    Use of undefined constant ‘action’ - assumed '‘action’' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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 50% 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
Please fix 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 register_activation_hook() in wp-content/plugins/hide-related-products/Hide-Related-Product.php:10

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 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
5 plugin tags: woocommerce, hide, related products, remove, hide related products

hide-related-products/Hide-Related-Product.php 92% from 13 tests

"Hide Related Products in WooCommerce" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hide-related-products.php" instead of "Hide-Related-Product.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15816

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.80
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin