68% icarry-in-shipping-tracking

Code Review | iCarry.in Shipping & Tracking

WordPress plugin iCarry.in Shipping & Tracking scored 68% from 54 tests.

About plugin

  • Plugin page: icarry-in-shippin...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Sep 25, 2019
  • Latest release: Jul 23, 2021
  • Number of updates: 18
  • Update frequency: every 37.6 days
  • Top authors: manojshanbhag (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 768 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼2.62ms] Passed 4 tests

This is a short check of server-side resources used by iCarry.in Shipping & Tracking
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2250.30 ▲7.49
Dashboard /wp-admin3.52 ▲0.2248.87 ▼0.04
Posts /wp-admin/edit.php3.63 ▲0.2850.29 ▼1.21
Add New Post /wp-admin/post-new.php6.12 ▲0.2393.44 ▼10.64
Media Library /wp-admin/upload.php3.44 ▲0.2140.98 ▲1.42

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

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

Browser metrics Passed 4 tests

iCarry.in Shipping & Tracking: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.28 ▼1.141.77 ▲0.0541.65 ▲1.08
Dashboard /wp-admin2,219 ▲314.95 ▲0.09108.56 ▼5.2538.56 ▼1.39
Posts /wp-admin/edit.php2,105 ▲132.09 ▲0.0341.62 ▲0.9235.73 ▼1.78
Add New Post /wp-admin/post-new.php1,525 ▼1722.49 ▲4.18631.60 ▲19.6458.21 ▲10.77
Media Library /wp-admin/upload.php1,398 ▲104.28 ▲0.0699.84 ▼7.1344.91 ▲0.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables detected upon uninstall: 3 tables
    • wp_ela_shipment_status
    • wp_ela_order_shipment
    • wp_ela_pickup_address
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • theysaidso_admin_options
    • icarry_shipping
    • icarry_language_id
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • icarry_module_version
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/icarry-in-shipping-tracking/admin/estimate_international.php
    • > /wp-content/plugins/icarry-in-shipping-tracking/admin/icarry_home.php
    • > /wp-content/plugins/icarry-in-shipping-tracking/admin/faq.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/icarry-in-shipping-tracking/admin/pickup_address.php:2
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php:4
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php:4
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/icarry-in-shipping-tracking/admin/api_token.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: icarry logistics courier woocommerce

icarry-in-shipping-tracking/woocommerce-icarry.php 92% from 13 tests

Analyzing the main PHP file in "iCarry.in Shipping & Tracking" version 2.0.0
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 ("icarry-in-shipping-tracking.php" instead of "woocommerce-icarry.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin8,780 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,482774,219
PHP8210713,008
JavaScript5180641,553

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity117.00
▷ Minimum class complexity117.00
▷ Maximum class complexity117.00
Average method complexity6.27
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/alert.png1.04KB0.86KB▼ 17.79%
images/icarry-icon.png1.28KB0.72KB▼ 44.00%
images/shape.png1.04KB0.86KB▼ 17.79%
images/info.png0.93KB0.65KB▼ 29.72%
images/checked.png0.61KB0.48KB▼ 20.13%