79% sync-dukan

Code Review | SyncDukan

WordPress plugin SyncDukan scored 79% from 54 tests.

About plugin

  • Plugin page: sync-dukan
  • 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: May 17, 2022
  • Latest release: May 30, 2022
  • Number of updates: 3
  • Update frequency: every 6.7 days
  • Top authors: inspurate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.55MB] [CPU: ▼15.11ms] Passed 4 tests

An overview of server-side resources used by SyncDukan
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.67 ▼3.11
Dashboard /wp-admin3.43 ▲0.1354.39 ▲4.96
Posts /wp-admin/edit.php3.55 ▲0.1951.82 ▼0.05
Add New Post /wp-admin/post-new.php3.31 ▼2.5839.14 ▼60.48
Media Library /wp-admin/upload.php3.35 ▲0.1339.02 ▲3.22
CRON Jobs /wp-admin/admin.php?page=sync-dukan-cron3.3230.62
Orders /wp-admin/admin.php?page=sync-dukan-orders3.3034.70
Products /wp-admin/admin.php?page=sync-dukan-products3.3033.93
Sync Dukan /wp-admin/admin.php?page=sync-dukan3.3026.96

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
dukan_access_code
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for SyncDukan
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲10413.23 ▼1.141.73 ▼0.3142.97 ▼4.33
Dashboard /wp-admin2,245 ▲604.86 ▼1.02108.61 ▼2.1937.14 ▼2.40
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0238.34 ▼0.3134.70 ▲0.18
Add New Post /wp-admin/post-new.php1,567 ▲5318.26 ▲0.72603.59 ▲13.0652.89 ▲5.59
Media Library /wp-admin/upload.php1,427 ▲394.27 ▲0.0793.24 ▼5.3142.15 ▲0.73
CRON Jobs /wp-admin/admin.php?page=sync-dukan-cron7802.0423.3825.36
Orders /wp-admin/admin.php?page=sync-dukan-orders6941.556.9922.07
Products /wp-admin/admin.php?page=sync-dukan-products6941.556.6821.35
Sync Dukan /wp-admin/admin.php?page=sync-dukan6931.556.9114.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 has failed, leaving 7 options in the database
    • dukan_access_code
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/sync-dukan/views/status.php
  • 4× 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/views/connect_dukan.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sync-dukan/views/products.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sync-dukan/sync-dukan.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sync-dukan/views/orders.php:14

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

The readme.txt file uses markdown syntax to describe your plugin to the world
No plugin tags provided

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

"SyncDukan" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
15 characters long description:
Syncs dukan.pk!

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
Everything looks great! No dangerous files found in this plugin850 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP517455782
JavaScript112468

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin