77% wine-club

Code Review | Wine Club Connection

WordPress plugin Wine Club Connection scored77%from 54 tests.

About plugin

  • Plugin page: wine-club
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2020
  • Latest release: Apr 14, 2023
  • Number of updates: 14
  • Update frequency: every 83.7 days
  • Top authors: wooclubsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,129 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.87ms] Passed 4 tests

Server-side resources used by Wine Club Connection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.84 ▼2.25
Dashboard /wp-admin3.32 ▲0.0146.99 ▼1.39
Posts /wp-admin/edit.php3.37 ▲0.0149.23 ▼1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.49 ▼14.02
Media Library /wp-admin/upload.php3.24 ▲0.0133.91 ▼1.82

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wine Club Connection
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.20 ▼1.552.02 ▲0.3643.20 ▲2.09
Dashboard /wp-admin2,209 ▲244.87 ▼0.1596.33 ▼3.3936.01 ▼6.29
Posts /wp-admin/edit.php2,086 ▼01.99 ▼0.0439.07 ▲2.3234.72 ▲3.95
Add New Post /wp-admin/post-new.php1,533 ▲523.06 ▼0.18650.80 ▲33.0952.15 ▲3.49
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0798.91 ▼0.1842.07 ▼1.86

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wine-club/public/partials/wine-club-public-display.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wine-club/public/partials/wineClubMembershipInMyAccount.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wine-club/admin/partials/membership/addMembershipLevel.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wine-club/public/class-wine-club-public-frontend.php:25
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/wine-club/admin/partials/membership/membershipLevels.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wine-club/public/partials/wineClubWelcomeEmail.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wine-club/public/class-wine-club-public.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_tabs() in wp-content/plugins/wine-club/admin/partials/shipping/shippingSettings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_tabs() in wp-content/plugins/wine-club/admin/partials/wine-club-admin.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_tabs() in wp-content/plugins/wine-club/admin/partials/bachOrders/initSteps.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wine-club/admin/class-wine-club-admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #5 (/assets/banner-image.png)
The official readme.txt might help

wine-club/wine-club-connection.php 77% from 13 tests

The primary PHP file in "Wine Club Connection" version 1.1.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 193 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wine-club.php" instead of "wine-club-connection.php")

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
Good job! No executable or dangerous file extensions detected11,298 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript23,1241,9469,218
PHP284997841,903
CSS21015172
JSON1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.67
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods84
▷ Static methods89.52%
▷ Public methods6982.14%
▷ Protected methods00.00%
▷ Private methods1517.86%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 1.00MB with 0.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/wineclubconnection.png76.82KB34.55KB▼ 55.03%
assets/screenshot-3.png85.49KB36.71KB▼ 57.05%
assets/screenshot-1.png50.70KB22.03KB▼ 56.56%
assets/banner-772x250.png326.62KB105.65KB▼ 67.65%
admin/images/filled-cancel.png33.37KB18.62KB▼ 44.20%