83% codup-woocommerce-dynamic-pricing-table-view

Code Review | Codup WooCommerce Dynamic Pricing Table View

WordPress plugin Codup WooCommerce Dynamic Pricing Table View scored83%from 54 tests.

About plugin

  • Plugin page: codup-woocommerce...
  • Plugin version: 1.2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 8, 2017
  • Latest release: Sep 13, 2022
  • Number of updates: 34
  • Update frequency: every 55.3 days
  • Top authors: codup (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /3,400 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.37ms] Passed 4 tests

An overview of server-side resources used by Codup WooCommerce Dynamic Pricing Table View
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.66 ▼2.83
Dashboard /wp-admin3.41 ▲0.1050.71 ▼4.61
Posts /wp-admin/edit.php3.52 ▲0.1652.59 ▼4.86
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.40 ▼13.19
Media Library /wp-admin/upload.php3.33 ▲0.1039.88 ▲3.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Codup WooCommerce Dynamic Pricing Table View
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.32 ▼1.054.63 ▲3.0341.02 ▼1.57
Dashboard /wp-admin2,218 ▲274.87 ▼1.03104.88 ▲1.4241.36 ▼6.11
Posts /wp-admin/edit.php2,101 ▲122.04 ▲0.0341.12 ▲1.4534.33 ▼5.65
Add New Post /wp-admin/post-new.php1,526 ▲723.50 ▲0.30657.48 ▲46.8357.04 ▲5.36
Media Library /wp-admin/upload.php1,394 ▲34.21 ▼0.03100.53 ▼2.7943.42 ▲1.96

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woocommerce_wp_checkbox() in wp-content/plugins/codup-woocommerce-dynamic-pricing-table-view/templates/wc-pricing-table-tab-options.php:7
    • > PHP Notice
      Undefined variable: pricing_rule_sets in wp-content/plugins/codup-woocommerce-dynamic-pricing-table-view/templates/wc-pricing-table-template.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/codup-woocommerce-dynamic-pricing-table-view/templates/wc-pricing-table-template.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/codup-woocommerce-dynamic-pricing-table-view/templates/wc-pricing-table-template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/codup-woocommerce-dynamic-pricing-table-view/templates/wc-pricing-table-template.php:73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/codup-woocommerce-dynamic-pricing-table-view/templates/wc-pricing-table-tab.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

codup-woocommerce-dynamic-pricing-table-view/class-wc-pricing-table.php 77% from 13 tests

The main PHP file in "Codup WooCommerce Dynamic Pricing Table View" ver. 1.2.1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("codup-woocommerce-dynamic-pricing-table-view.php" instead of "class-wc-pricing-table.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin771 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9205262587
JavaScript3232977
YAML17053
CSS28532
XML22022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.38
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes450.00%
▷ Concrete classes450.00%
▷ Final classes125.00%
Methods48
▷ Static methods36.25%
▷ Public methods4491.67%
▷ Protected methods00.00%
▷ Private methods48.33%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants13
▷ Global constants430.77%
▷ Class constants969.23%
▷ Public constants9100.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