10% woo-pricing-table

Code Review | WooCommerce Pricing - Product Pricing

WordPress plugin WooCommerce Pricing - Product Pricing scored10%from 54 tests.

About plugin

  • Plugin page: woo-pricing-table
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.3
  • WordPress version: 6.3.1
  • First release: Mar 22, 2018
  • Latest release: Oct 16, 2023
  • Number of updates: 31
  • Update frequency: every 65.6 days
  • Top authors: totalsoft (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /13,631 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼0.07MB] [CPU: ▼12.61ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Pricing - Product Pricing
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.46 ▼0.36
Dashboard /wp-admin3.34 ▼0.0047.39 ▼17.23
Posts /wp-admin/edit.php3.41 ▲0.0648.32 ▼1.67
Add New Post /wp-admin/post-new.php5.50 ▼0.3873.84 ▼28.53
Media Library /wp-admin/upload.php3.26 ▲0.0336.39 ▼2.99
Table Manager /wp-admin/admin.php?page=Total_Soft_Pricing_Table?TS_PTable_Nonce=9bfc0fa7103.0623.35
Support Forum /wp-admin/admin.php?page=Total_Soft_Pricing_Support2.8419.51
Total Products /wp-admin/admin.php?page=Total_Soft_Pricing_Table_Products?TS_PTable_Nonce=9bfc0fa7103.0627.45

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 36 new files
Database: 10 new tables, 7 new options
New tables
wp_totalsoft_icons
wp_totalsoft_ptable_cols_def
wp_totalsoft_ptable_manager_new
wp_totalsoft_ptable_manager
wp_totalsoft_ptable_sets_new
wp_totalsoft_ptable_cols
wp_totalsoft_ptable_id
wp_totalsoft_ptable_cols_new
wp_totalsoft_ptable_sets
wp_totalsoft_ptable_sets_def
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_total_soft_pricing_table
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Pricing - Product Pricing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲10514.80 ▲0.431.76 ▼0.2644.12 ▲3.02
Dashboard /wp-admin2,270 ▲934.95 ▼0.7184.99 ▼3.9963.39 ▲20.54
Posts /wp-admin/edit.php2,195 ▲922.47 ▲0.4935.82 ▼7.1935.64 ▼2.95
Add New Post /wp-admin/post-new.php1,605 ▲7923.60 ▲0.53658.59 ▼1.8038.02 ▼19.43
Media Library /wp-admin/upload.php1,485 ▲884.41 ▲0.32104.53 ▼6.0871.63 ▲21.62
Table Manager /wp-admin/admin.php?page=Total_Soft_Pricing_Table?TS_PTable_Nonce=9bfc0fa710280.420.104.22
Support Forum /wp-admin/admin.php?page=Total_Soft_Pricing_Support2,8183.9191.9198.40
Total Products /wp-admin/admin.php?page=Total_Soft_Pricing_Table_Products?TS_PTable_Nonce=9bfc0fa710280.420.074.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 10 tables in the database
    • wp_totalsoft_icons
    • wp_totalsoft_ptable_manager
    • wp_totalsoft_ptable_manager_new
    • wp_totalsoft_ptable_cols_new
    • wp_totalsoft_ptable_cols_def
    • wp_totalsoft_ptable_id
    • wp_totalsoft_ptable_sets_new
    • wp_totalsoft_ptable_sets_def
    • wp_totalsoft_ptable_cols
    • wp_totalsoft_ptable_sets
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_total_soft_pricing_table

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/woo-pricing-table/Includes/Total-Soft-Products.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woo-pricing-table/Includes/Total-Soft-Pricing-Table-Widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-pricing-table/Includes/Total-Soft-Pricing-Table-Ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/woo-pricing-table/Includes/Total-Soft-Pricing-Table-Media.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woo-pricing-table/Includes/Total-Soft-Pricing-Table-Widget.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=Total_Soft_Pricing_Table?TS_PTable_Nonce=9bfc0fa710
    • > Network (severe)
    wp-admin/admin.php?page=Total_Soft_Pricing_Table?TS_PTable_Nonce=9bfc0fa710 - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=Total_Soft_Pricing_Table_Products?TS_PTable_Nonce=9bfc0fa710
    • > Network (severe)
    wp-admin/admin.php?page=Total_Soft_Pricing_Table_Products?TS_PTable_Nonce=9bfc0fa710 - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can take inspiration from this readme.txt

woo-pricing-table/index.php 85% from 13 tests

The main file in "WooCommerce Pricing - Product Pricing" v. 1.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 240 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-pricing-table.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin19,642 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2606889,941
PHP95121944,829
CSS3359194,187
SVG100685

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity219.00
▷ Minimum class complexity219.00
▷ Maximum class complexity219.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions52
▷ Named functions3567.31%
▷ Anonymous functions1732.69%
Constants0
▷ Global constants00.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
14 compressed PNG files occupy 0.29MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/TotalSoftLogo.png6.69KB5.59KB▼ 16.44%
Images/Themes/type5.png11.32KB10.40KB▼ 8.18%
Images/Products/Calendar.png36.30KB35.46KB▼ 2.30%
Images/Products/Gallery_video.png36.05KB34.79KB▼ 3.48%
Images/Products/Event_Calendar.png32.69KB31.51KB▼ 3.62%