10% woocommerce-check-pincode-zipcode-for-shipping

Code Review | Woocommerce check pincode/zipcode for shipping

WordPress plugin Woocommerce check pincode/zipcode for shipping scored 10% from 54 tests.

About plugin

  • Plugin page: woocommerce-check...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Aug 1, 2023
  • Number of updates: 243
  • Update frequency: every 12.4 days
  • Top authors: phoeniixx (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

500+ active / 52,134 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5643
    File upgrade-functions.php is deprecated since version 2.5.0! Use wp-admin/includes/upgrade.php instead.

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.22ms] Passed 4 tests

A check of server-side resources used by Woocommerce check pincode/zipcode for shipping
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.56 ▲0.92
Dashboard /wp-admin3.31 ▲0.0152.88 ▼21.31
Posts /wp-admin/edit.php3.36 ▲0.0154.05 ▼0.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.08 ▼10.23
Media Library /wp-admin/upload.php3.23 ▲0.0038.73 ▼0.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 34 new files
Database: 2 new tables, 6 new options
New tables
wp_check_pincode_p
wp_pincode_zipcode_setting_free
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce check pincode/zipcode for shipping
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.24 ▼1.441.87 ▲0.0038.27 ▼9.18
Dashboard /wp-admin2,210 ▲44.85 ▼0.96111.45 ▼1.9544.21 ▲0.66
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0042.79 ▲7.9141.02 ▲9.04
Add New Post /wp-admin/post-new.php1,527 ▼1123.37 ▼0.18671.14 ▲20.9145.79 ▼9.14
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0099.80 ▼6.5942.88 ▼5.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_check_pincode_p
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/partials/phoen-pincode-zipcode-public-display.php
    • > /wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/enter-pincode.php
    • > /wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/admin/partials/phoen-pincode-zipcode-admin-display.php
    • > /wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php
  • 93× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/enter-pincode.php on line 13
    • > PHP Fatal error
      Trait 'Stored' not found in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/admin/class-phoen-pincode-zipcode-admin.php on line 23
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 30
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/enter-pincode.php on line 13
    • > PHP Notice
      Undefined variable: available_pincode_data in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 88
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 107
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-check-pincode-zipcode-for-shipping/public/pages/available-pincode.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 25 tag instead of maximum 10
The official readme.txt is a good inspiration

woocommerce-check-pincode-zipcode-for-shipping/phoen-pincode-zipcode.php 85% from 13 tests

The main PHP file in "Woocommerce check pincode/zipcode for shipping" ver. 2.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-check-pincode-zipcode-for-shipping.php" instead of "phoen-pincode-zipcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,426 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP232725511,121
CSS2565251
JavaScript295454

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.09
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods65
▷ Static methods913.85%
▷ Public methods4569.23%
▷ Protected methods23.08%
▷ Private methods1827.69%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/page_white_zip.png0.46KB0.43KB▼ 8.21%