78% hide-wc-categories-products

Code Review | Hiding WC Products & Terms

WordPress plugin Hiding WC Products & Terms scored78%from 54 tests.

About plugin

  • Plugin page: hide-wc-categorie...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2022
  • Latest release: Mar 7, 2023
  • Number of updates: 9
  • Update frequency: every 9.2 days
  • Top authors: vijayrathod245 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.97ms] Passed 4 tests

Server-side resources used by Hiding WC Products & Terms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0340.26 ▼3.23
Dashboard /wp-admin3.32 ▲0.0245.70 ▼1.98
Posts /wp-admin/edit.php3.37 ▲0.0147.57 ▲2.17
Add New Post /wp-admin/post-new.php5.92 ▲0.03105.46 ▲5.69
Media Library /wp-admin/upload.php3.24 ▲0.0132.10 ▼0.82

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
hide_wc_products_terms_list
widget_recent-comments
theysaidso_admin_options
hwpt_submit_category_settings_data
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hiding WC Products & Terms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16713.60 ▼0.788.58 ▲6.5537.19 ▼5.25
Dashboard /wp-admin2,222 ▲314.95 ▲0.05112.40 ▲13.7343.87 ▲1.72
Posts /wp-admin/edit.php2,111 ▲222.06 ▲0.0541.02 ▲0.0540.58 ▲5.66
Add New Post /wp-admin/post-new.php1,433 ▼8121.96 ▲4.19564.01 ▼39.3657.06 ▲4.45
Media Library /wp-admin/upload.php1,401 ▲134.34 ▲0.1799.79 ▲6.2442.17 ▲1.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • hide_wc_products_terms_list
    • hwpt_submit_category_settings_data

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/hide-wc-categories-products/public/partials/hiding-wc-products-terms-public-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Hiding_WC_Products_Terms_Admin' not found in wp-content/plugins/hide-wc-categories-products/admin/partials/hiding-wc-products-terms-select-option-settings-page-admin-display.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Hiding_WC_Products_Terms_Admin' not found in wp-content/plugins/hide-wc-categories-products/admin/partials/hiding-wc-products-terms-admin-display.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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: tags, products, categories, woocommerce, hide

hide-wc-categories-products/hiding-wc-products-terms.php 85% from 13 tests

The principal PHP file in "Hiding WC Products & Terms" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hide-wc-categories-products.php" instead of "hiding-wc-products-terms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin947 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS228564
PHP13135586373
JavaScript355510

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.86
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.39
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/image/chosen-sprite.png0.63KB0.88KB0.00%