58% sokan-integration

Code Review | ارسال اطلاعات فروش ووکامرس برای سکان

WordPress plugin ارسال اطلاعات فروش ووکامرس برای سکان scored 58% from 54 tests.

About plugin

  • Plugin page: sokan-integration
  • Plugin version: 1.6.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 6.3.1
  • First release: Dec 15, 2021
  • Latest release: Jun 20, 2022
  • Number of updates: 40
  • Update frequency: every 4.7 days
  • Top authors: sokangroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,959 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.10ms] Passed 4 tests

Analyzing server-side resources used by ارسال اطلاعات فروش ووکامرس برای سکان
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.98 ▼8.35
Dashboard /wp-admin3.31 ▲0.0043.50 ▼10.39
Posts /wp-admin/edit.php3.36 ▲0.0047.13 ▼5.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.75 ▼0.07
Media Library /wp-admin/upload.php3.23 ▲0.0040.95 ▲6.48

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by ارسال اطلاعات فروش ووکامرس برای سکان
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.66 ▼0.523.96 ▲2.1941.50 ▼1.67
Dashboard /wp-admin2,206 ▲155.09 ▼0.80108.88 ▼7.0938.49 ▼9.42
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0041.49 ▲6.2735.13 ▼3.68
Add New Post /wp-admin/post-new.php1,542 ▲923.45 ▲0.28669.03 ▼6.8670.00 ▲9.28
Media Library /wp-admin/upload.php1,388 ▲64.24 ▲0.0796.45 ▼12.6641.55 ▼3.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/sokan-integration/uninstall.php+14
    Use of undefined constant SKNG_PLUGIN_PATH - assumed 'SKNG_PLUGIN_PATH' (this will throw an Error in a future version of PHP)
  • This plugin has failed uninstalling correctly, leaving 11 files (0.08MB) in the plugin directory
    • (new file) Sokan-integration.php
    • (new file) include/classes/class-skng-api.php
    • (new file) index.php
    • (new file) include/classes/class-skng-logger.php
    • (new file) include/classes/class-skng-db.php
    • (new file) assets/images/sokan-logo.png
    • (new file) include/custom/skng-custom.php
    • (new file) job/sync_data.php
    • (new file) readme.txt
    • (new file) admin.php
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/sokan-integration/uninstall.php
    • > /wp-content/plugins/sokan-integration/job/sync_data.php
    • > /wp-content/plugins/sokan-integration/Sokan-integration.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Skng_Sokan_db' not found in wp-content/plugins/sokan-integration/admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in sokan-integration/assets to your readme.txt
Please take inspiration from this readme.txt

sokan-integration/Sokan-integration.php 85% from 13 tests

Analyzing the main PHP file in "ارسال اطلاعات فروش ووکامرس برای سکان" version 1.6.2
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sokan-integration.php" instead of "Sokan-integration.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,114 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP92432991,114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.75
▷ Minimum class complexity2.00
▷ Maximum class complexity59.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods3284.21%
▷ Protected methods00.00%
▷ Private methods615.79%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/sokan-logo.png12.70KB4.64KB▼ 63.45%