10% orillacart

Code Review | Orilla Cart - eCommerce

WordPress plugin Orilla Cart - eCommerce scored10%from 54 tests.

About plugin

  • Plugin page: orillacart
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.7
  • WordPress version: 6.3.1
  • First release: Nov 10, 2013
  • Latest release: Jul 9, 2018
  • Number of updates: 82
  • Update frequency: every 20.8 days
  • Top authors: orillacart (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

50+ active /23,633 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/orillacart/core/path.php+72
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.47MB] [CPU: ▼51.46ms] Passed 4 tests

Analyzing server-side resources used by Orilla Cart - eCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.52 ▼0.948.59 ▼33.03
Dashboard /wp-admin2.54 ▼0.7610.86 ▼39.77
Posts /wp-admin/edit.php2.54 ▼0.8110.25 ▼39.14
Add New Post /wp-admin/post-new.php2.54 ▼3.349.98 ▼93.89
Media Library /wp-admin/upload.php2.54 ▼0.698.10 ▼26.77
Countries /wp-admin/admin.php?page=component_com_shop-country2.5410.00
List all products /wp-admin/edit.php?post_type=product2.549.40
Orders /wp-admin/edit.php?post_type=shop_order2.5410.17
Payment Methods /wp-admin/admin.php?page=component_com_shop-payment2.549.92
Manage Amounts /wp-admin/admin.php?page=component_com_shop-stockroom-manage2.5411.65
Stockrooms /wp-admin/admin.php?page=component_com_shop-stockroom2.548.52
Shipping Groups /wp-admin/edit-tags.php?taxonomy=shipping_group&post_type=product2.549.23
Configuration /wp-admin/admin.php?page=component_com_shop-admin-configuration2.548.91
Attribute Sets /wp-admin/admin.php?page=component_com_shop-attributes2.5410.04
Product tags /wp-admin/edit-tags.php?taxonomy=product_tags&post_type=product2.548.28

Server storage [IO: ▲3.15MB] [DB: ▲0.06MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 336 new files
Database: 19 new tables, 8 new options
New tables
wp_shop_shipping_rate
wp_shop_order_attribute_item
wp_shop_cart
wp_shop_attribute
wp_shop_attribute_property
wp_shop_variations
wp_shop_products_stockroom_xref
wp_shop_termmeta
wp_shop_category_xref
wp_shop_state
...
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
shop_parameters
widget_com_shop_cart
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Orilla Cart - eCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.32 ▼1.474.63 ▲2.8443.02 ▼4.31
Dashboard /wp-admin2,291 ▲1035.87 ▼0.06110.21 ▼1.1342.18 ▼4.83
Posts /wp-admin/edit.php2,173 ▲812.01 ▲0.0140.39 ▲4.0434.50 ▼0.27
Add New Post /wp-admin/post-new.php1,604 ▲8722.02 ▲4.39716.59 ▲94.5670.57 ▲7.73
Media Library /wp-admin/upload.php1,476 ▲884.20 ▼0.0494.79 ▼11.1342.58 ▼2.24
Countries /wp-admin/admin.php?page=component_com_shop-country1,4061.8029.7649.92
List all products /wp-admin/edit.php?post_type=product1,2371.9930.8630.84
Orders /wp-admin/edit.php?post_type=shop_order1,2191.9734.5830.85
Payment Methods /wp-admin/admin.php?page=component_com_shop-payment9111.7227.1532.28
Manage Amounts /wp-admin/admin.php?page=component_com_shop-stockroom-manage1,1593.0856.5935.04
Stockrooms /wp-admin/admin.php?page=component_com_shop-stockroom9071.7025.4532.46
Shipping Groups /wp-admin/edit-tags.php?taxonomy=shipping_group&post_type=product1,3192.2625.1530.66
Configuration /wp-admin/admin.php?page=component_com_shop-admin-configuration7,2252.1430.9145.07
Attribute Sets /wp-admin/admin.php?page=component_com_shop-attributes9081.7125.3232.17
Product tags /wp-admin/edit-tags.php?taxonomy=product_tags&post_type=product1,3162.1427.5930.28

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/orillacart/core/path.php+72
    Array and string offset access syntax with curly braces is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_com_shop_cart
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 39 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=product_tags&post_type=product
    • > Deprecated in wp-content/plugins/orillacart/core/path.php+76
    Array and string offset access syntax with curly braces is deprecated
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=component_com_shop-attributes
    • > Deprecated in wp-content/plugins/orillacart/com_shop/shop.php+174
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=shop_order
    • > Warning in wp-content/plugins/orillacart/com_shop/action_handlers.php+957
    Use of undefined constant cb - assumed 'cb' (this will throw an Error in a future version of PHP)

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
The following issues need your attention
  • 76× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/orillacart/com_shop/admin/views/generalsettings/templates/settings.tpl.php
    • > /wp-content/plugins/orillacart/helpers/strings.php
    • > /wp-content/plugins/orillacart/com_shop/admin/models/tax.php
    • > /wp-content/plugins/orillacart/com_shop/admin/views/shipping/view.html.php
    • > /wp-content/plugins/orillacart/core/selfregisterable.php
    • > /wp-content/plugins/orillacart/com_shop/admin/views/generalsettings/templates/global.settings.tpl.php
    • > /wp-content/plugins/orillacart/com_shop/admin/views/shipping/templates/list_carriers.tpl.php
    • > /wp-content/plugins/orillacart/com_shop/tables/shop_attribute_set.php
    • > /wp-content/plugins/orillacart/com_shop/admin/views/generalsettings/templates/site.settings.tpl.php
    • > /wp-content/plugins/orillacart/com_shop/tables/tax_rate.php
  • 102× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/orillacart/com_shop/admin/views/attributes/templates/edit_set.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/orillacart/com_shop/methods/cheque.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BObject' not found in wp-content/plugins/orillacart/helpers/jsimplexml.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'SelfRegisterable' not found in wp-content/plugins/orillacart/com_shop/methods/payment_method.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'controller' not found in wp-content/plugins/orillacart/com_shop/admin/controllers/shipping.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Model' not found in wp-content/plugins/orillacart/com_shop/front/models/account.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/orillacart/com_shop/admin/views/product/templates/variations_manager.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/orillacart/com_shop/admin/views/payment/templates/add_payment_form.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/orillacart/com_shop/admin/views/shipping/templates/select_states.tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/orillacart/com_shop/admin/views/country/templates/state_list.tpl.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=component_com_shop-stockroom-manage
    • > Network (severe)
    wp-content/plugins/orillacart/com_shop/assets/js/themes/default/style.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
You can take inspiration from this readme.txt

orillacart/main.php 92% from 13 tests

"Orilla Cart - eCommerce" version 1.4.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("orillacart.php" instead of "main.php")

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
Everything looks great! No dangerous files found in this plugin44,811 lines of code in 274 files:
LanguageFilesBlank linesComment linesLines of code
PHP2177,8921,99722,850
JavaScript381,5311,47214,592
CSS12336834,215
PO File21,2961,9102,727
SVG100380
XML10044
HTML3003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.80
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes159
▷ Abstract classes148.81%
▷ Concrete classes14591.19%
▷ Final classes85.52%
Methods1,099
▷ Static methods1089.83%
▷ Public methods92484.08%
▷ Protected methods16014.56%
▷ Private methods151.36%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants19
▷ Global constants947.37%
▷ Class constants1052.63%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
35 PNG files occupy 0.24MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
com_shop/assets/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
com_shop/assets/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
com_shop/assets/images/no.png0.66KB0.46KB▼ 29.73%
com_shop/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
com_shop/assets/images/register.png1.49KB1.39KB▼ 6.55%