84% zij-kart

Code Review | ZIJ KART

WordPress plugin ZIJ KART scored84%from 54 tests.

About plugin

  • Plugin page: zij-kart
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: May 7, 2023
  • Number of updates: 4
  • Update frequency: every 600.8 days
  • Top authors: zijsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /520 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼3.66ms] Passed 4 tests

An overview of server-side resources used by ZIJ KART
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2241.48 ▲1.60
Dashboard /wp-admin3.60 ▲0.2546.61 ▼18.71
Posts /wp-admin/edit.php3.65 ▲0.2946.28 ▲3.26
Add New Post /wp-admin/post-new.php6.11 ▲0.2289.03 ▼0.80
Media Library /wp-admin/upload.php3.46 ▲0.2337.38 ▲4.01
Brands /wp-admin/admin.php?page=zk_brand3.4733.38
Category /wp-admin/admin.php?page=zk_category3.4734.08
Purchase history /wp-admin/admin.php?page=zk_purchasehistory3.4834.50
Options /wp-admin/admin.php?page=zk_option3.4932.98
Products /wp-admin/admin.php?page=zk_product3.5735.01
ZijKart Dashboard /wp-admin/admin.php?page=zk_zijkart3.4233.00

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 91 new files
Database: 7 new tables, 6 new options
New tables
wp_zijkart_options
wp_zijkart_products
wp_zijkart_categories
wp_zijkart_cart
wp_zijkart_cartitems
wp_zijkart_product_images
wp_zijkart_brands
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

ZIJ KART: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.21 ▼1.184.39 ▲2.5539.23 ▼6.39
Dashboard /wp-admin2,257 ▲665.87 ▼0.04100.50 ▼5.3374.38 ▲29.16
Posts /wp-admin/edit.php2,139 ▲501.98 ▼0.0634.40 ▼2.3533.28 ▼1.33
Add New Post /wp-admin/post-new.php1,716 ▲19624.65 ▲1.48637.56 ▼38.3751.66 ▼6.51
Media Library /wp-admin/upload.php1,433 ▲424.20 ▼0.0393.74 ▼9.2071.35 ▲27.48
Brands /wp-admin/admin.php?page=zk_brand8971.8024.5732.61
Category /wp-admin/admin.php?page=zk_category8961.9225.8227.24
Purchase history /wp-admin/admin.php?page=zk_purchasehistory8962.0425.7126.37
Options /wp-admin/admin.php?page=zk_option1,1791.8027.0125.32
Products /wp-admin/admin.php?page=zk_product9071.8228.3024.18
ZijKart Dashboard /wp-admin/admin.php?page=zk_zijkart8491.9125.1327.15

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=zk_zijkart
    • > Network (severe)
    wp-content/plugins/zijkart/includes/images/admin_menu_icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: paypal shopping cart, shop, paypal cart, zij kart, shopping cart...

zij-kart/zij-kart.php 92% from 13 tests

The main PHP script in "ZIJ KART" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 236 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected7,423 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP456541,9176,183
JavaScript44738762
CSS42032478

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 525)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity41.32
▷ Minimum class complexity1.00
▷ Maximum class complexity764.00
Average method complexity7.11
▷ Minimum method complexity1.00
▷ Maximum method complexity525.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes00.00%
Methods167
▷ Static methods2414.37%
▷ Public methods14486.23%
▷ Protected methods00.00%
▷ Private methods2313.77%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
32 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
includes/images/colorpicker_hex.png0.52KB0.42KB▼ 19.92%
includes/images/deleteicon.png15.97KB1.21KB▼ 92.39%
includes/images/custom_hsb_h.png0.95KB0.73KB▼ 23.40%
includes/images/custom_hex.png0.55KB0.39KB▼ 28.11%