83% relay-point-for-woocommerce

Code Review | Relay Point for WooCommerce

WordPress plugin Relay Point for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: relay-point-for-w...
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jul 20, 2021
  • Latest release: Oct 16, 2023
  • Number of updates: 5
  • Update frequency: every 163.6 days
  • Top authors: popwers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Relay Point for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.03 ▼8.91
Dashboard /wp-admin3.31 ▲0.0151.72 ▼3.31
Posts /wp-admin/edit.php3.36 ▲0.0154.77 ▲2.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.76 ▲5.91
Media Library /wp-admin/upload.php3.23 ▲0.0132.30 ▼3.49

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Relay Point for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.531.65 ▼0.7441.94 ▼3.65
Dashboard /wp-admin2,195 ▲245.59 ▼0.1193.33 ▼3.2239.74 ▼9.46
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0139.60 ▲1.4034.89 ▼0.11
Add New Post /wp-admin/post-new.php1,526 ▼023.55 ▲0.55673.88 ▲11.1058.07 ▲6.03
Media Library /wp-admin/upload.php1,394 ▼64.11 ▼0.09104.65 ▼1.2543.66 ▼2.93

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/relay-point-for-woocommerce/modules/class_relay_shipping.php:74

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
  • License uri: Invalid URI found ("[https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)")
You can take inspiration from this readme.txt

relay-point-for-woocommerce/woo_relay_shipping.php 92% from 13 tests

The main PHP file in "Relay Point for WooCommerce" ver. 2.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("relay-point-for-woocommerce.php" instead of "woo_relay_shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected255 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43238228
PO File17027

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
No PNG files were detected