78% yektanet-ecommerce

Code Review | Yektanet Ecommerce

WordPress plugin Yektanet Ecommerce scored78%from 54 tests.

About plugin

  • Plugin page: yektanet-ecommerce
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.3.0
  • WordPress version: 6.3.1
  • First release: Feb 7, 2022
  • Latest release: Jul 12, 2023
  • Number of updates: 10
  • Update frequency: every 52.4 days
  • Top authors: ynproduct (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /4,222 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Yektanet Ecommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0736.19 ▼3.75
Dashboard /wp-admin3.38 ▲0.0746.49 ▲2.07
Posts /wp-admin/edit.php3.49 ▲0.1350.83 ▲5.53
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.84 ▼3.09
Media Library /wp-admin/upload.php3.30 ▲0.0738.28 ▲3.50

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
YEKTANET_ECOMMERCE_PLUGIN_VERSION

Browser metrics Passed 4 tests

Checking browser requirements for Yektanet Ecommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲14313.73 ▼0.651.81 ▼0.0132.69 ▼17.10
Dashboard /wp-admin2,247 ▲564.87 ▼1.0399.01 ▼6.4345.68 ▲2.03
Posts /wp-admin/edit.php2,136 ▲441.99 ▼0.0239.55 ▼0.8045.53 ▲8.06
Add New Post /wp-admin/post-new.php1,401 ▼12720.62 ▼2.46545.37 ▼142.66169.86 ▲112.79
Media Library /wp-admin/upload.php1,429 ▲414.18 ▼0.05125.92 ▲14.1050.93 ▲6.55
تنظیمات /wp-admin/yektanet-settings.php260.440.0710.33
یکتانت /wp-admin/yektanet-menu.php260.440.085.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • YEKTANET_ECOMMERCE_PLUGIN_VERSION
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'YektanetMainClass' not found in wp-content/plugins/yektanet-ecommerce/classes/YektanetCartHandler.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'YektanetAdminMainClass' not found in wp-content/plugins/yektanet-ecommerce/classes/admin_classes/YektanetAdminMenu.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'YektanetMainClass' not found in wp-content/plugins/yektanet-ecommerce/classes/YektanetOrderHandler.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'YektanetMainClass' not found in wp-content/plugins/yektanet-ecommerce/classes/YektanetProductHandler.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/yektanet-settings.php
    • > Network (severe)
    wp-admin/yektanet-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/yektanet-menu.php
    • > Network (severe)
    wp-admin/yektanet-menu.php - 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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: woocommerce

yektanet-ecommerce/yektanet-ecommerce.php 92% from 13 tests

"Yektanet Ecommerce" version 1.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.4" instead of "6.1.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,168 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13117501,006
CSS121093
JavaScript10069

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.38
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods1127.50%
▷ Protected methods1127.50%
▷ Private methods1845.00%
Functions31
▷ Named functions1961.29%
▷ Anonymous functions1238.71%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu-icon.png1.72KB1.38KB▼ 19.65%