68% mypacco

Code Review | Mypacco

WordPress plugin Mypacco scored 68% from 54 tests.

About plugin

  • Plugin page: mypacco
  • Plugin version: 0.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 20, 2016
  • Latest release: Dec 28, 2016
  • Number of updates: 14
  • Update frequency: every 0.4 days
  • Top authors: harshkohad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 776 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.48MB] [CPU: ▲2.33ms] Passed 4 tests

An overview of server-side resources used by Mypacco
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5749.07 ▲9.80
Dashboard /wp-admin3.77 ▲0.4650.04 ▲3.03
Posts /wp-admin/edit.php3.88 ▲0.5349.42 ▲1.57
Add New Post /wp-admin/post-new.php6.35 ▲0.4691.91 ▼3.30
Media Library /wp-admin/upload.php3.69 ▲0.4643.18 ▲8.02
Orders /wp-admin/admin.php?page=mypacco-orders3.6538.37
Manage Warehouse /wp-admin/admin.php?page=mypacco-manage-warehouse3.6536.41
/wp-admin/admin.php?page=mypacco_add_warehouse3.6637.65
/wp-admin/admin.php?page=mypacco_add_order3.6537.88
Mypacco /wp-admin/admin.php?page=mypacco-menu3.6537.91
Validate Pincode /wp-admin/admin.php?page=mypacco-validate-pincode3.6537.45
Track Orders /wp-admin/admin.php?page=mypacco-track-orders3.6536.44
Configuration /wp-admin/admin.php?page=mypacco-config3.6537.73
/wp-admin/admin.php?page=mypacco_edit_order3.6336.77

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 36 new files
Database: 4 new tables, 6 new options
New tables
wp_mypacco_order_master
wp_mypacco_warehouse
wp_mypacco_setup
wp_mypacco_order_item_master
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Mypacco
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,145 ▲41018.19 ▲3.8115.77 ▲14.1633.13 ▼11.44
Dashboard /wp-admin2,323 ▲1327.46 ▲2.56135.40 ▲30.0043.41 ▲2.20
Posts /wp-admin/edit.php2,215 ▲1264.27 ▲2.2062.28 ▲26.4647.95 ▲12.95
Add New Post /wp-admin/post-new.php1,626 ▲9124.87 ▲1.61657.78 ▼31.9738.04 ▼25.62
Media Library /wp-admin/upload.php1,514 ▲1296.79 ▲2.60121.23 ▲13.5639.72 ▼5.73
Orders /wp-admin/admin.php?page=mypacco-orders8583.9045.3530.79
Manage Warehouse /wp-admin/admin.php?page=mypacco-manage-warehouse8953.8848.6728.24
/wp-admin/admin.php?page=mypacco_add_warehouse8693.8149.3129.08
/wp-admin/admin.php?page=mypacco_add_order1,0963.7949.0630.86
Mypacco /wp-admin/admin.php?page=mypacco-menu9233.7549.0725.44
Validate Pincode /wp-admin/admin.php?page=mypacco-validate-pincode8953.8748.6828.30
Track Orders /wp-admin/admin.php?page=mypacco-track-orders8583.9348.4324.71
Configuration /wp-admin/admin.php?page=mypacco-config9113.8549.3529.23
/wp-admin/admin.php?page=mypacco_edit_order1,0074.1945.8831.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_mypacco_order_item_master
    • wp_mypacco_setup
    • wp_mypacco_warehouse
    • wp_mypacco_order_master
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > POST request to /wp-admin/admin-ajax.php?action=reaload_status
    • > Warning in wp-content/plugins/mypacco/mypacco.php+907
    Illegal string offset 'access_token'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > POST request to /wp-admin/admin-ajax.php?action=reaload_status
    • > Notice in wp-content/plugins/mypacco/mypacco.php+907
    Uninitialized string offset: 0
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2464
    Undefined index: id
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2542
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2486
    Trying to get property 'delivery_fullname' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2487
    Trying to get property 'order_id' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2500
    Trying to get property 'delivery_state' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2506
    Trying to get property 'delivery_mobile' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2508
    Trying to get property 'delivery_pincode' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2510
    Trying to get property 'delivery_country' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2514
    Trying to get property 'delivery_email' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2518
    Trying to get property 'delivery_city' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2523
    Trying to get property 'transport_mode' of non-object
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2536
    Trying to get property 'delivery_address' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mypacco_edit_order
    • > Notice in wp-content/plugins/mypacco/mypacco.php+2542
    Trying to get property 'payment_type' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mypacco/mypacco.php:176

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: shipping, shipping cost, shipping product, international shipping, shipping rate...

mypacco/mypacco.php 92% from 13 tests

The primary PHP file in "Mypacco" version 0.9.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 600 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected6,575 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript84988932,959
PHP24183772,096
CSS62841691,520

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions35
▷ Named functions35100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
17 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/datatable/images/sort_both.png1.11KB0.29KB▼ 74.12%
assets/images/woocommerce_module.png11.42KB5.52KB▼ 51.65%
assets/css/datatable/images/forward_enabled.png1.05KB0.19KB▼ 82.26%
assets/images/mypacco-logo.png4.02KB2.57KB▼ 36.04%
assets/js/datatable/images/sort_desc.png1.10KB0.25KB▼ 77.73%