78% shipyaari-shipping-managment

Code Review | Shipyaari Shipping Management

WordPress plugin Shipyaari Shipping Management scored78%from 54 tests.

About plugin

  • Plugin page: shipyaari-shippin...
  • Plugin version: 1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.2-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2020
  • Latest release: Jul 22, 2023
  • Number of updates: 7
  • Update frequency: every 171.4 days
  • Top authors: piyushmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Shipyaari Shipping Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.87 ▼4.30
Dashboard /wp-admin3.31 ▼0.0445.26 ▼13.04
Posts /wp-admin/edit.php3.36 ▲0.0042.38 ▼5.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.99 ▼18.55
Media Library /wp-admin/upload.php3.23 ▲0.0036.08 ▲1.50

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Shipyaari Shipping Management
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.511.56 ▼0.1737.18 ▼8.83
Dashboard /wp-admin2,195 ▲215.53 ▼0.1087.93 ▼4.9937.74 ▲0.27
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0636.46 ▲1.3532.40 ▼6.51
Add New Post /wp-admin/post-new.php1,535 ▼217.99 ▼0.10603.22 ▼6.5171.14 ▲9.93
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.04100.66 ▼0.5841.62 ▼2.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/shipyaari-shipping-managment/service_partner.php
    • > /wp-content/plugins/shipyaari-shipping-managment/track_consignment.php
    • > /wp-content/plugins/shipyaari-shipping-managment/track_customer_consignment.php
    • > /wp-content/plugins/shipyaari-shipping-managment/create_consignment.php
    • > /wp-content/plugins/shipyaari-shipping-managment/consignment_placed.php
  • 29× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined offset: 0 in wp-content/plugins/shipyaari-shipping-managment/service_partner.php on line 82
    • > PHP Notice
      Undefined variable: service_name in wp-content/plugins/shipyaari-shipping-managment/service_partner.php on line 68
    • > PHP Notice
      Undefined index: order_id in wp-content/plugins/shipyaari-shipping-managment/service_partner.php on line 7
    • > WordPress database error Table 'potrivit.wp_woocommerce_order_items' doesn't exist for query SELECT order_item_name FROM wp_posts wp INNER JOIN wp_woocommerce_order_items wc ON wc.order_item_name = wp.post_title WHERE wc.order_id=''
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/shipyaari-shipping-managment/shipyaari.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/shipyaari-shipping-managment/popup.php:31
    • > WordPress database error Table 'potrivit.wp_woocommerce_order_items' doesn't exist for query SELECT order_item_name FROM wp_posts wp INNER JOIN wp_woocommerce_order_items wc ON wc.order_item_name = wp.post_title WHERE wc.order_id=''
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/shipyaari-shipping-managment/shipyaari.php on line 16
    • > PHP Notice
      Undefined variable: invoicevalue in wp-content/plugins/shipyaari-shipping-managment/service_partner.php on line 68
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/shipyaari-shipping-managment/track_info.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: woocommerce shipyaari shipping, shipyaari api, shipping management, shipyaari shipping plugin, wordpress shipping...

shipyaari-shipping-managment/shipyaari.php 85% from 13 tests

"Shipyaari Shipping Management" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shipyaari-shipping-managment.php" instead of "shipyaari.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.8" instead of "6.2.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin19,775 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript53,0682,08713,570
CSS351563,186
PHP12390683,019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.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
PNG images were not found in this plugin