77% pargo

Code Review | Pargo Smart Logistics Solutions

WordPress plugin Pargo Smart Logistics Solutions scored77%from 54 tests.

About plugin

  • Plugin page: pargo
  • Plugin version: 3.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2016
  • Latest release: Oct 30, 2023
  • Number of updates: 185
  • Update frequency: every 14.9 days
  • Top authors: tarynpargo (79.46%)Richard_infolog (17.3%)stevenellis (4.32%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /11,749 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
Installer ran successfully

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

A check of server-side resources used by Pargo Smart Logistics Solutions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.15 ▼10.36
Dashboard /wp-admin3.31 ▼0.0443.71 ▼25.19
Posts /wp-admin/edit.php3.36 ▲0.0049.10 ▲5.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.74 ▼4.88
Media Library /wp-admin/upload.php3.23 ▲0.0032.86 ▼1.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 171 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
pargo_token
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Pargo Smart Logistics Solutions: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.171.63 ▼0.1337.28 ▼7.18
Dashboard /wp-admin2,195 ▲185.63 ▲0.0689.56 ▼12.6740.00 ▼1.89
Posts /wp-admin/edit.php2,103 ▲31.96 ▼0.0240.49 ▲1.4236.08 ▲3.75
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▲0.18662.59 ▼130.0042.71 ▼8.20
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0199.49 ▼2.3243.32 ▼0.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • pargo_token
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 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 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pargo/src/PargoAdmin/partials/pargo-admin-display.php
    • > /wp-content/plugins/pargo/src/PargoPublic/partials/pargo-public-display.php
  • 31× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\CutStub' not found in wp-content/plugins/pargo/lib/symfony/var-dumper/Caster/CutArrayStub.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' not found in wp-content/plugins/pargo/lib/symfony/var-dumper/Caster/ImgStub.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PargoWp\\PargoAdmin\\Pargo_Admin_API' not found in wp-content/plugins/pargo/src/Includes/Pargo_Orders.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' not found in wp-content/plugins/pargo/lib/symfony/var-dumper/Cloner/VarCloner.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/pargo/lib/symfony/polyfill-php80/PhpToken.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\VarDumper\\Cloner\\Stub' not found in wp-content/plugins/pargo/lib/symfony/var-dumper/Caster/TraceStub.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/pargo/src/Includes/Pargo_Wp_Shipping_Method.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Polyfill\\Php80\\PhpToken' not found in wp-content/plugins/pargo/lib/symfony/polyfill-php80/Resources/stubs/PhpToken.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' not found in wp-content/plugins/pargo/lib/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' not found in wp-content/plugins/pargo/lib/symfony/var-dumper/Dumper/AbstractDumper.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #6 (Cart once point has been selected) image missing
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

pargo/pargo-shipping.php 77% from 13 tests

"Pargo Smart Logistics Solutions" version 3.4.1'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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("pargo.php" instead of "pargo-shipping.php")

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
No dangerous file extensions were detected60,234 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10219240,269
PHP1152,0253,13313,569
JSON10004,705
Vuejs Component880131,009
Markdown71520525
CSS5411157

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity18.84
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces19
Interfaces6
Traits1
Classes87
▷ Abstract classes22.30%
▷ Concrete classes8597.70%
▷ Final classes1011.76%
Methods494
▷ Static methods22745.95%
▷ Public methods39880.57%
▷ Protected methods214.25%
▷ Private methods7515.18%
Functions120
▷ Named functions10083.33%
▷ Anonymous functions2016.67%
Constants89
▷ Global constants1415.73%
▷ Class constants7584.27%
▷ Public constants4661.33%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/PargoAdmin/css/pargo_icon.png21.78KB10.35KB▼ 52.48%
assets/images/pargo_logo.png2.42KB1.67KB▼ 31.07%