84% wc-products-visibility

Code Review | Products and Variations Visibility PRO For WooCommerce

WordPress plugin Products and Variations Visibility PRO For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-products-visib...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Jan 13, 2023
  • Latest release: Oct 31, 2023
  • Number of updates: 13
  • Update frequency: every 22.5 days
  • Top authors: oneteamsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /466 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.36MB] [CPU: ▼5.66ms] Passed 4 tests

Server-side resources used by Products and Variations Visibility PRO For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3741.77 ▲2.26
Dashboard /wp-admin3.68 ▲0.3351.93 ▼7.99
Posts /wp-admin/edit.php3.73 ▲0.3745.72 ▲1.18
Add New Post /wp-admin/post-new.php6.26 ▲0.3782.71 ▼16.11
Media Library /wp-admin/upload.php3.60 ▲0.3737.96 ▲0.29

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 166 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Products and Variations Visibility PRO For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.35 ▲0.001.68 ▼0.0144.11 ▲0.67
Dashboard /wp-admin2,209 ▲295.62 ▼0.0393.73 ▲2.5042.16 ▼0.12
Posts /wp-admin/edit.php2,111 ▲82.02 ▲0.0035.77 ▲1.3733.81 ▲1.00
Add New Post /wp-admin/post-new.php1,535 ▲923.60 ▲0.59706.57 ▼46.5251.99 ▼1.30
Media Library /wp-admin/upload.php1,411 ▲84.20 ▲0.0294.48 ▼15.7040.64 ▼7.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 93× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'OneTeamSoftware\\WC\\Rule\\ConditionDefinition\\ConditionDefinitionInterface' not found in wp-content/plugins/wc-products-visibility/includes/WC/Rule/ConditionDefinition/StockStatus.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'OneTeamSoftware\\Logger\\AbstractLogger' not found in wp-content/plugins/wc-products-visibility/includes/Logger/NullLogger.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'OneTeamSoftware\\Rule\\Matcher\\ItemsMatcher' not found in wp-content/plugins/wc-products-visibility/includes/WC/Rule/Matcher/Product.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'OneTeamSoftware\\WC\\Admin\\PageForm\\AbstractPageForm' not found in wp-content/plugins/wc-products-visibility/includes/WC/ProductsVisibility/Admin/GeneralForm.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'OneTeamSoftware\\WC\\Rule\\ConditionDefinition\\AbstractOptionsConditionDefinition' not found in wp-content/plugins/wc-products-visibility/includes/WC/Rule/ConditionDefinition/Attributes.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'OneTeamSoftware\\Logger\\AbstractLogger' not found in wp-content/plugins/wc-products-visibility/includes/Logger/EchoLogger.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'OneTeamSoftware\\Rule\\Matcher\\ItemOptionMatcherInterface' not found in wp-content/plugins/wc-products-visibility/includes/WC/Rule/Matcher/ItemOptionMatcher/Product.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'OneTeamSoftware\\WC\\Rule\\ConditionDefinition\\ConditionDefinitionInterface' not found in wp-content/plugins/wc-products-visibility/includes/WC/Rule/ConditionDefinition/AbstractOptionsConditionDefinition.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'OneTeamSoftware\\WC\\ProductsVisibility\\ItemsFilter\\ItemsFilterInterface' not found in wp-content/plugins/wc-products-visibility/includes/WC/ProductsVisibility/ItemsFilter/ItemsSorter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'OneTeamSoftware\\WC\\Options\\TaxonomyArrayBuilderInterface' not found in wp-content/plugins/wc-products-visibility/includes/WC/Options/TaxonomyArrayBuilder.php:7

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: woocommerce product variations visibility, product variations visibility, product visibility, woocommerce, visibility...

wc-products-visibility/wc-products-visibility.php Passed 13 tests

"Products and Variations Visibility PRO For WooCommerce" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
64 characters long description:
Define rules when products and variations are visible or hidden.

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
Good job! No executable or dangerous file extensions detected8,798 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PHP1481,8984,6487,322
JSON1001,307
CSS6140101
JavaScript5267268

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.44
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces36
Interfaces24
Traits0
Classes116
▷ Abstract classes97.76%
▷ Concrete classes10792.24%
▷ Final classes00.00%
Methods603
▷ Static methods233.81%
▷ Public methods46877.61%
▷ Protected methods10116.75%
▷ Private methods345.64%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants1173.33%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/1TeamSoftware-icon.png0.59KB0.75KB0.00%
assets/images/1TeamSoftware-logo.png14.55KB4.50KB▼ 69.05%