93% kargomkolay-shipping

Code Review | KargomKolay Express Shipping

WordPress plugin KargomKolay Express Shipping scored 93% from 54 tests.

About plugin

  • Plugin page: kargomkolay-shipping
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 5.8.1
  • First release: Mar 28, 2020
  • Latest release: Jul 5, 2020
  • Number of updates: 5
  • Update frequency: every 20.2 days
  • Top authors: kargomkolay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 425 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼149.02ms] Passed 4 tests

This is a short check of server-side resources used by KargomKolay Express Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1736.17 ▲14.60
Dashboard /wp-admin3.11 ▲0.0646.47 ▼6.03
Posts /wp-admin/edit.php3.22 ▲0.1245.12 ▲3.91
Add New Post /wp-admin/post-new.php5.47 ▲0.0488.30 ▼592.33
Media Library /wp-admin/upload.php3.05 ▲0.0534.51 ▼1.63

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for KargomKolay Express Shipping
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲9716.34 ▲0.7914.19 ▲1.0244.66 ▲1.32
Dashboard /wp-admin2,967 ▲365.99 ▲0.05154.15 ▼8.61108.43 ▼1.10
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0166.63 ▼2.1888.50 ▼6.01
Add New Post /wp-admin/post-new.php1,683 ▼018.75 ▼0.03396.86 ▼25.64111.16 ▲1.82
Media Library /wp-admin/upload.php1,804 ▼35.02 ▲0.00157.53 ▼6.58122.74 ▲7.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kargomkolay-shipping/shipping.php:127
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kargomkolay-shipping/shipping.php:127

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
10 plugin tags: tnt, kargomkolay, yurtd, express, shipping...

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

The primary PHP file in "KargomKolay Express Shipping" version 1.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kargomkolay-shipping.php" instead of "kargomkolay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected306 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3106170306

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.57
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin