10% postcode-shipping-module

Code Review | WP E-commerce Postcode Shipping Module

WordPress plugin WP E-commerce Postcode Shipping Module scored10%from 54 tests.

About plugin

  • Plugin page: postcode-shipping...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.6
  • WordPress version: 6.3.1
  • First release: Jan 27, 2014
  • Latest release: Jun 20, 2022
  • Number of updates: 6
  • Update frequency: every 511.2 days
  • Top authors: zhuyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,818 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
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/postcode-shipping-module/wp-e-commerce-postcode-shipping.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; wpsc_postcode_shipping has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼59.86ms] Passed 4 tests

This is a short check of server-side resources used by WP E-commerce Postcode Shipping Module
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.71 ▼39.20
Dashboard /wp-admin2.10 ▼1.215.70 ▼44.44
Posts /wp-admin/edit.php2.10 ▼1.265.43 ▼49.51
Add New Post /wp-admin/post-new.php2.10 ▼3.798.34 ▼106.30
Media Library /wp-admin/upload.php2.10 ▼1.136.57 ▼27.56

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

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

Browser metrics Passed 4 tests

WP E-commerce Postcode Shipping Module: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.034.27 ▲2.2447.81 ▲3.64
Dashboard /wp-admin2,206 ▲185.85 ▼0.05120.52 ▲3.3645.69 ▲2.67
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0239.27 ▼10.1035.47 ▼4.01
Add New Post /wp-admin/post-new.php1,538 ▲2423.35 ▼0.20713.96 ▼16.6054.62 ▼2.42
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.07118.66 ▲5.6147.58 ▼9.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/postcode-shipping-module/wp-e-commerce-postcode-shipping.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; wpsc_postcode_shipping has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
Please take inspiration from this readme.txt

postcode-shipping-module/wp-e-commerce-postcode-shipping.php 92% from 13 tests

"WP E-commerce Postcode Shipping Module" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("postcode-shipping-module.php" instead of "wp-e-commerce-postcode-shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected165 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15037165

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin