77% woo-parcel-pro

Code Review | Parcel Pro

WordPress plugin Parcel Pro scored77%from 54 tests.

About plugin

  • Plugin page: woo-parcel-pro
  • Plugin version: 1.6.16
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Nov 23, 2023
  • Number of updates: 170
  • Update frequency: every 13.0 days
  • Top authors: parcelpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /35,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.56ms] Passed 4 tests

Server-side resources used by Parcel Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.61 ▼3.10
Dashboard /wp-admin3.35 ▲0.0045.77 ▼15.01
Posts /wp-admin/edit.php3.40 ▲0.0548.51 ▲0.83
Add New Post /wp-admin/post-new.php5.96 ▲0.07100.85 ▲7.95
Media Library /wp-admin/upload.php3.27 ▲0.0435.05 ▲3.04

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Parcel Pro: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲16913.92 ▼0.798.65 ▲7.0436.88 ▼7.69
Dashboard /wp-admin2,216 ▲365.80 ▲0.1398.83 ▲7.0142.59 ▲1.49
Posts /wp-admin/edit.php2,129 ▲292.28 ▲0.3441.70 ▲0.6735.06 ▼0.68
Add New Post /wp-admin/post-new.php1,559 ▲2423.31 ▼2.02657.91 ▲22.3636.92 ▼23.47
Media Library /wp-admin/upload.php1,429 ▲264.38 ▲0.1296.97 ▲1.0741.91 ▲1.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-actions-bulk.php
    • > /wp-content/plugins/woo-parcel-pro/woocommerce-parcelpro.php
    • > /wp-content/plugins/woo-parcel-pro/public/partials/parcelpro-public-order-tracking.php
  • 35× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PARCELPRO_REQUIRED_PHP_VERSION - assumed 'PARCELPRO_REQUIRED_PHP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-requirements-error.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-parcel-pro/admin/data/parcelpro-shipping-settings-fields.php:23
    • > PHP Warning
      Use of undefined constant PARCELPRO_SHOPSUNITED - assumed 'PARCELPRO_SHOPSUNITED' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-actions-before.php on line 16
    • > PHP Warning
      require_once(ABSPATHwp-admin/admin.php): failed to open stream: No such file or directory in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-actions-package.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-order-actions-before.php:17
    • > PHP Warning
      Use of undefined constant PARCELPRO_NAME - assumed 'PARCELPRO_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-requirements-error.php on line 17
    • > PHP Notice
      Undefined variable: ship_link in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-order-actions-before.php on line 16
    • > PHP Warning
      Use of undefined constant PARCELPRO_SHOPSUNITED - assumed 'PARCELPRO_SHOPSUNITED' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-actions-after.php on line 16
    • > PHP Notice
      Undefined variable: label_link in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-actions-after.php on line 16
    • > PHP Warning
      Use of undefined constant PARCELPRO_SHOPSUNITED - assumed 'PARCELPRO_SHOPSUNITED' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-parcel-pro/admin/partials/parcelpro-admin-actions-after.php on line 16

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 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

woo-parcel-pro/woocommerce-parcelpro.php 69% from 13 tests

This is the main PHP file of "Parcel Pro" version 1.6.16, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-parcel-pro.php" instead of "woocommerce-parcelpro.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,531 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP202848211,780
JavaScript2555270
Markdown1890216
CSS2310195
SVG40440
JSON10030

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity39.17
▷ Minimum class complexity1.00
▷ Maximum class complexity126.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods5490.00%
▷ Protected methods00.00%
▷ Private methods610.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin