79% sync-dukan-with-wc

Code Review | Sync Dukan with WC

WordPress plugin Sync Dukan with WC scored79%from 54 tests.

About plugin

  • Plugin page: sync-dukan-with-wc
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Jun 12, 2022
  • Latest release: Nov 13, 2022
  • Number of updates: 11
  • Update frequency: every 15.0 days
  • Top authors: dukanpk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /764 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.54MB] [CPU: ▼19.97ms] Passed 4 tests

Server-side resources used by Sync Dukan with WC
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1433.27 ▼2.73
Dashboard /wp-admin3.45 ▲0.1043.35 ▼17.73
Posts /wp-admin/edit.php3.56 ▲0.2146.10 ▼2.22
Add New Post /wp-admin/post-new.php3.32 ▼2.5634.99 ▼57.20
Media Library /wp-admin/upload.php3.37 ▲0.1440.12 ▲5.85
Orders /wp-admin/admin.php?page=sync-dukan-orders3.3130.98
Products /wp-admin/admin.php?page=sync-dukan-products3.3131.01
Sync Dukan /wp-admin/admin.php?page=sync-dukan3.3131.17
CRON Jobs /wp-admin/admin.php?page=sync-dukan-cron3.3430.75

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
dukan_access_code
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Sync Dukan with WC
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲11513.65 ▼1.034.37 ▲2.7540.53 ▼0.75
Dashboard /wp-admin2,242 ▲544.86 ▼1.0498.32 ▼7.8339.28 ▼2.27
Posts /wp-admin/edit.php2,125 ▲362.04 ▲0.0235.35 ▼1.6531.25 ▼1.42
Add New Post /wp-admin/post-new.php1,558 ▲3923.18 ▲0.03670.33 ▲2.4546.62 ▲0.33
Media Library /wp-admin/upload.php1,421 ▲334.23 ▲0.08107.86 ▲11.6848.68 ▲6.49
Orders /wp-admin/admin.php?page=sync-dukan-orders6941.168.0014.64
Products /wp-admin/admin.php?page=sync-dukan-products6941.557.1320.94
Sync Dukan /wp-admin/admin.php?page=sync-dukan6931.557.2015.48
CRON Jobs /wp-admin/admin.php?page=sync-dukan-cron7952.0622.3523.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • dukan_access_code

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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sync-dukan-with-wc/views/status.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sync-dukan-with-wc/views/products.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sync-dukan-with-wc/views/connect_dukan.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sync-dukan-with-wc/views/orders.php:14
    • > PHP Notice
      Undefined variable: dukan_connection in wp-content/plugins/sync-dukan-with-wc/views/status.php on line 10
    • > PHP Notice
      Undefined variable: d_access_code in wp-content/plugins/sync-dukan-with-wc/views/status.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sync-dukan-with-wc/sync-dukan-with-wc.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
No tags were detected

sync-dukan-with-wc/sync-dukan-with-wc.php Passed 13 tests

This is the main PHP file of "Sync Dukan with WC" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
15 characters long description:
Syncs dukan.pk!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,089 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP519860903
XML40095
JavaScript117591

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.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
There were not PNG files found in your plugin