89% e-commerce-shipping-insurance

Code Review | Shipping Insurance for WooCommerce

WordPress plugin Shipping Insurance for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: e-commerce-shippi...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 18, 2023
  • Latest release: Sep 21, 2023
  • Number of updates: 16
  • Update frequency: every 9.6 days
  • Top authors: jonzrq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Shipping Insurance for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0625.57 ▼16.12
Dashboard /wp-admin3.33 ▲0.0246.82 ▼2.73
Posts /wp-admin/edit.php3.38 ▲0.0251.21 ▲3.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.29 ▼17.48
Media Library /wp-admin/upload.php3.25 ▲0.0235.52 ▲0.66

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Shipping Insurance for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼30613.23 ▼1.080.62 ▼1.1116.09 ▼24.68
Dashboard /wp-admin2,206 ▲155.88 ▲0.9998.84 ▼6.3040.46 ▼0.63
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0338.50 ▼3.4732.04 ▼2.29
Add New Post /wp-admin/post-new.php1,542 ▲1418.44 ▲0.26644.39 ▲26.2462.87 ▲13.30
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.0793.75 ▼6.5844.38 ▼1.82

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: plugin, shipping, insurance, ecommerce, woocommerce

e-commerce-shipping-insurance/shipping-insurance-for-woocommerce.php 77% from 13 tests

The entry point to "Shipping Insurance for WooCommerce" version 1.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("e-commerce-shipping-insurance.php" instead of "shipping-insurance-for-woocommerce.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
No dangerous file extensions were detected287 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP27248282
JavaScript1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin