84% wine-ring-for-woocommerce

Code Review | Wine Ring for WooCommerce

WordPress plugin Wine Ring for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wine-ring-for-woo...
  • Plugin version: 2.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Feb 11, 2021
  • Latest release: Aug 4, 2022
  • Number of updates: 28
  • Update frequency: every 19.3 days
  • Top authors: wineringtechadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.94ms] Passed 4 tests

This is a short check of server-side resources used by Wine Ring for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1539.89 ▼0.79
Dashboard /wp-admin3.52 ▲0.2150.77 ▼2.39
Posts /wp-admin/edit.php3.62 ▲0.2652.30 ▼0.90
Add New Post /wp-admin/post-new.php6.12 ▲0.2396.63 ▼6.42
Media Library /wp-admin/upload.php3.40 ▲0.1636.59 ▼2.05

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
wr4wc_db_version
wr4wc_plugin_options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Wine Ring for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6313.30 ▼0.664.73 ▲3.0841.86 ▼0.28
Dashboard /wp-admin2,230 ▲535.81 ▲0.1488.45 ▼4.3039.26 ▼7.15
Posts /wp-admin/edit.php2,140 ▲402.26 ▲0.2740.38 ▲6.7134.61 ▼2.48
Add New Post /wp-admin/post-new.php1,562 ▲3618.31 ▼4.85629.51 ▲9.3248.16 ▼2.21
Media Library /wp-admin/upload.php1,435 ▲384.46 ▲0.26101.40 ▼3.3342.47 ▼4.87

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • wr4wc_db_version
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/wine-ring-for-woocommerce/templates/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wine-ring-for-woocommerce/inc/wr-label-post-type.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wine-ring-for-woocommerce/inc/admin.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
3 plugin tags: wine, labels, woocommerce

wine-ring-for-woocommerce/wine-ring-for-woocommerce.php Passed 13 tests

The main file in "Wine Ring for WooCommerce" v. 2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Integrate Wine Ring functionality into your WooCommerce store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,120 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP112181591,112
JavaScript1417
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.29
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods725.93%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions31
▷ Named functions2993.55%
▷ Anonymous functions26.45%
Constants2
▷ Global constants2100.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