68% real-wp-shop-lite

Code Review | Real WP Shop Lite Ajax eCommerce Shopping Cart

WordPress plugin Real WP Shop Lite Ajax eCommerce Shopping Cart scored68%from 54 tests.

About plugin

  • Plugin page: real-wp-shop-lite
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Nov 13, 2014
  • Latest release: Mar 12, 2016
  • Number of updates: 69
  • Update frequency: every 7.0 days
  • Top authors: vk011 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /7,168 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▼2.10ms] Passed 4 tests

An overview of server-side resources used by Real WP Shop Lite Ajax eCommerce Shopping Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.29 ▲0.5650.69 ▲7.36
Dashboard /wp-admin4.11 ▲0.5460.70 ▲5.83
Posts /wp-admin/edit.php4.16 ▲0.4851.74 ▼1.17
Add New Post /wp-admin/post-new.php6.65 ▲0.5091.60 ▼13.73
Media Library /wp-admin/upload.php3.99 ▲0.5041.75 ▲0.69
Edit Products /wp-admin/admin.php?page=vkrwps_edit_products3.9336.17
Orders /wp-admin/admin.php?page=vkrwps_orders3.9542.05
Payment Options /wp-admin/admin.php?page=vkrwps_payment_options3.9538.76
Add Products /wp-admin/admin.php?page=vkrwps_add_products3.9838.56
Categories /wp-admin/admin.php?page=vkrwps_categories3.9537.10
Real WP Shop Lite /wp-admin/admin.php?page=real-wp-shop-lite/rwps-admin-home.php4.0040.08
Delete Products /wp-admin/admin.php?page=vkrwps_delete_products3.9538.61
Strings /wp-admin/admin.php?page=vkrwps_strings3.9540.00

Server storage [IO: ▲0.42MB] [DB: ▲0.01MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/real-wp-shop-lite/" and "wp-content/uploads/"
    • (new file) wp-content/rwpsliteuploads/.empty
Filesystem: 29 new files
Database: 6 new tables, 62 new options
New tables
wp_vkrwps_categories
wp_vkrwps_paypal
wp_vkrwps_order_info
wp_vkrwps_products
wp_vkrwps_payment_options
wp_vkrwps_orderid
New WordPress options
vkrwps_ppemail
vkrwps_pricetext
vkrwps_cps
vkrwps_clear_cart_s
vkrwps_step3_s
vkrwps_nltextc
vkrwps_sci_s
vkrwps_orders_paging
vkrwps_empty_cart_s
vkrwps_cart_total_wt_s
...

Browser metrics Passed 4 tests

A check of browser resources used by Real WP Shop Lite Ajax eCommerce Shopping Cart
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲21513.99 ▼0.3016.94 ▲15.1845.06 ▲2.16
Dashboard /wp-admin2,259 ▲795.73 ▲0.0584.30 ▼13.3376.71 ▲32.35
Posts /wp-admin/edit.php2,164 ▲672.11 ▲0.1136.26 ▼3.2733.86 ▼0.80
Add New Post /wp-admin/post-new.php1,576 ▲3122.09 ▼1.45749.75 ▲64.0538.66 ▼13.39
Media Library /wp-admin/upload.php1,455 ▲584.28 ▲0.04102.24 ▼11.0780.05 ▲34.67
Edit Products /wp-admin/admin.php?page=vkrwps_edit_products2,1368.16177.08110.18
Orders /wp-admin/admin.php?page=vkrwps_orders8942.2427.7127.76
Payment Options /wp-admin/admin.php?page=vkrwps_payment_options1,0211.8430.6031.60
Add Products /wp-admin/admin.php?page=vkrwps_add_products2,0578.10154.70120.40
Categories /wp-admin/admin.php?page=vkrwps_categories1,0151.8330.9929.62
Real WP Shop Lite /wp-admin/admin.php?page=real-wp-shop-lite/rwps-admin-home.php1,2512.1427.3743.00
Delete Products /wp-admin/admin.php?page=vkrwps_delete_products8851.8133.2528.95
Strings /wp-admin/admin.php?page=vkrwps_strings1,3332.2325.5927.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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 failed, leaving 6 tables in the database
    • wp_vkrwps_categories
    • wp_vkrwps_products
    • wp_vkrwps_payment_options
    • wp_vkrwps_orderid
    • wp_vkrwps_order_info
    • wp_vkrwps_paypal
  • The uninstall procedure has failed, leaving 62 options in the database
    • vkrwps_taxtext
    • vkrwps_twtas
    • vkrwps_weighttext
    • vkrwps_ae_subj
    • theysaidso_admin_options
    • vkrwps_cart_total_wt_s
    • vkrwps_addtocart_s
    • vkrwps_shopname
    • vkrwps_backts2_s
    • vkrwps_prt
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=vkrwps_edit_products
    • > Notice in wp-content/plugins/real-wp-shop-lite/inc/pc/edit_products_pc.php+110
    Undefined variable: pid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vkrwps_add_products
    • > Notice in wp-content/plugins/real-wp-shop-lite/inc/pc/add_products_pc.php+276
    Undefined variable: in_stock
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vkrwps_add_products
    • > Notice in wp-content/plugins/real-wp-shop-lite/inc/pc/add_products_pc.php+279
    Undefined variable: in_Stock
    • > GET request to /wp-admin/admin.php?page=vkrwps_add_products
    • > Notice in wp-content/plugins/real-wp-shop-lite/inc/pc/add_products_pc.php+222
    Undefined variable: ld

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 take a closer look at the following
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/real-wp-shop-lite/inc/options.php:3
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/real-wp-shop-lite/inc/countries.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/real-wp-shop-lite/real-wp-shop-lite.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/real-wp-shop-lite/inc/get_pc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/real-wp-shop-lite/inc/pc/a_orders_paging.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/real-wp-shop-lite/inc/pc/a_edit_products.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/real-wp-shop-lite/inc/countries.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/real-wp-shop-lite/rwps-admin-home.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/real-wp-shop-lite/inc/pc/a_update_order_status.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/real-wp-shop-lite/inc/pc/a_delete_order_row.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
  • Tags: Please reduce the number of tags, currently 42 tag instead of maximum 10
You can take inspiration from this readme.txt

real-wp-shop-lite/real-wp-shop-lite.php Passed 13 tests

The entry point to "Real WP Shop Lite Ajax eCommerce Shopping Cart" version 2.0.8 is a PHP file that has certain tags in its header comment area
37 characters long description:
Lite ecommerce solution for WordPress

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 plugin8,443 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,054293,897
JavaScript48533073,654
CSS312132892

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/chosen-sprite.png0.72KB0.65KB▼ 10.38%