74% aistore-multi-vendor-store

Code Review | Aistore Multi Vendor Store

WordPress plugin Aistore Multi Vendor Store scored74%from 54 tests.

About plugin

  • Plugin page: aistore-multi-ven...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: Jul 30, 2021
  • Latest release: Feb 27, 2022
  • Number of updates: 18
  • Update frequency: every 11.8 days
  • Top authors: susheelhbti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /465 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.25MB] [CPU: ▼3.01ms] Passed 4 tests

Server-side resources used by Aistore Multi Vendor Store
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2542.03 ▲2.33
Dashboard /wp-admin3.60 ▲0.2552.53 ▲2.23
Posts /wp-admin/edit.php3.71 ▲0.3247.91 ▼2.67
Add New Post /wp-admin/post-new.php6.18 ▲0.2587.95 ▼13.63
Media Library /wp-admin/upload.php3.52 ▲0.2539.81 ▲2.05
Sells List /wp-admin/admin.php?page=aistore_sells_list3.4936.29
Setting /wp-admin/admin.php?page=aistore_page_setting3.5043.90
Product List /wp-admin/admin.php?page=vendor_store3.4933.92
Add To Cart Report /wp-admin/admin.php?page=aistore_cart_list3.4936.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 30 new files
Database: 2 new tables, 6 new options
New tables
wp_aistore_multivendor_add_to_cart_report
wp_aistore_multivendor_system_orders
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Aistore Multi Vendor Store: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.74 ▲0.391.79 ▼0.0145.34 ▲1.41
Dashboard /wp-admin2,233 ▲595.50 ▼0.1786.34 ▼4.2538.21 ▼1.98
Posts /wp-admin/edit.php2,135 ▲381.99 ▼0.0236.31 ▲0.5333.04 ▼2.18
Add New Post /wp-admin/post-new.php1,554 ▲1923.09 ▲4.55597.10 ▼79.8364.79 ▼0.52
Media Library /wp-admin/upload.php1,438 ▲384.18 ▼0.0493.97 ▼18.1440.93 ▼5.70
Sells List /wp-admin/admin.php?page=aistore_sells_list8002.1623.1826.01
Setting /wp-admin/admin.php?page=aistore_page_setting1,0121.9932.5432.95
Product List /wp-admin/admin.php?page=vendor_store8171.9925.4124.85
Add To Cart Report /wp-admin/admin.php?page=aistore_cart_list8012.0224.9025.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_aistore_multivendor_add_to_cart_report
    • wp_aistore_multivendor_system_orders
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/aistore-multi-vendor-store/Setting/AistoreSettingsPage.class.php:337
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aistore-multi-vendor-store/widthdrawal/Widthdrawal_requests.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aistore-multi-vendor-store/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/aistore-multi-vendor-store/aistore_multivendor_wp_hooks/aistore_multivendor_hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aistore-multi-vendor-store/widthdrawal/Withdrawal.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aistore-multi-vendor-store/Admin/users_setting.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/aistore-multi-vendor-store/widthdrawal/Widthdrawal_requests.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aistore-multi-vendor-store/transaction_report.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/aistore-multi-vendor-store/aistore_multivendor_admin/AistoreSettingsPage.class.php:337
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/aistore-multi-vendor-store/widthdrawal/Widthdrawal_requests.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: aistore, multi vendor store

aistore-multi-vendor-store/index.php 85% from 13 tests

The entry point to "Aistore Multi Vendor Store" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("aistore-multi-vendor-store.php" instead of "index.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.3" instead of "5.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,815 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP222,3552263,803
JavaScript1209
CSS1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity14.58
▷ Minimum class complexity2.00
▷ Maximum class complexity58.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods52
▷ Static methods1325.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions61
▷ Named functions6098.36%
▷ Anonymous functions11.64%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin