84% pincode-based-product-price-woocommerce

Code Review | Pincode based product price woocommerce

WordPress plugin Pincode based product price woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: pincode-based-pro...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Jul 17, 2019
  • Latest release: May 16, 2023
  • Number of updates: 19
  • Update frequency: every 73.7 days
  • Top authors: letscms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,807 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.73ms] Passed 4 tests

Analyzing server-side resources used by Pincode based product price woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.54 ▼10.16
Dashboard /wp-admin3.31 ▲0.0046.75 ▼1.81
Posts /wp-admin/edit.php3.36 ▲0.0046.88 ▲0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.32 ▼10.80
Media Library /wp-admin/upload.php3.23 ▲0.0034.21 ▼0.14

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Pincode based product price woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.121.80 ▼0.0239.68 ▼3.16
Dashboard /wp-admin2,203 ▲154.84 ▼0.17112.52 ▼1.3840.60 ▼5.72
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0140.08 ▲3.1335.76 ▼0.18
Add New Post /wp-admin/post-new.php1,545 ▲1223.03 ▼0.15649.64 ▼62.3462.82 ▲3.79
Media Library /wp-admin/upload.php1,382 ▼64.11 ▼0.1599.90 ▼5.8342.78 ▼1.45

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pincode-based-product-price-woocommerce/includes/class-pbdpw-hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/pincode-based-product-price-woocommerce/includes/admin/class-pbdpw-import.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed: You can take inspiration from this readme.txt

pincode-based-product-price-woocommerce/pbdpw.php 92% from 13 tests

"Pincode based product price woocommerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pincode-based-product-price-woocommerce.php" instead of "pbdpw.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,503 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP9817105881
PO File101400300
JavaScript31768235
CSS282087

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.40
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods35
▷ Static methods925.71%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/zip-code.png0.46KB0.53KB0.00%
assets/images/postcode.png0.58KB0.47KB▼ 18.58%