84% postal-code-removal-for-woocommerce

Code Review | Postal Code Removal For WooCommerce

WordPress plugin Postal Code Removal For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: postal-code-remov...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Aug 15, 2020
  • Latest release: Aug 16, 2020
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: abidwaqar98 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Postal Code Removal For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.56 ▼0.13
Dashboard /wp-admin3.31 ▲0.0142.15 ▼4.88
Posts /wp-admin/edit.php3.36 ▲0.0044.32 ▼1.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.68 ▼13.05
Media Library /wp-admin/upload.php3.23 ▲0.0036.38 ▲4.73

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Postal Code Removal For WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.011.89 ▲0.0140.99 ▼4.27
Dashboard /wp-admin2,192 ▲185.64 ▼0.0585.74 ▼2.6741.12 ▲0.54
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0336.16 ▲0.3935.01 ▼3.30
Add New Post /wp-admin/post-new.php1,526 ▼022.90 ▼0.64667.96 ▲57.6956.79 ▲7.76
Media Library /wp-admin/upload.php1,394 ▼34.20 ▼0.07103.80 ▲6.3444.27 ▼1.28

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/postal-code-removal-for-woocommerce/postal-code-removal-for-woocommerce.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

postal-code-removal-for-woocommerce/postal-code-removal-for-woocommerce.php Passed 13 tests

The main file in "Postal Code Removal For WooCommerce" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
108 characters long description:
This Is A Lightweight Plugin That Removes The Postal Code Field Present In The Checkout Page Of WooCommmerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected6 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13116

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin