84% dokan-migrator

Code Review | Dokan Migrator

WordPress plugin Dokan Migrator scored 84% from 54 tests.

About plugin

  • Plugin page: dokan-migrator
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 6, 2023
  • Latest release: Jun 6, 2023
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: wedevs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 216 total downloads

Benchmarks

Plugin footprint 83% 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.27MB] [CPU: ▲0.35ms] Passed 4 tests

Analyzing server-side resources used by Dokan Migrator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2941.22 ▲1.35
Dashboard /wp-admin3.61 ▲0.3144.79 ▼5.10
Posts /wp-admin/edit.php3.66 ▲0.3050.07 ▲4.52
Add New Post /wp-admin/post-new.php6.13 ▲0.2495.86 ▲4.92
Media Library /wp-admin/upload.php3.47 ▲0.2437.71 ▲0.61

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 8 new options
New WordPress options
dokan_migrator_plugin_version
widget_recent-comments
dokan_migrator_installed_time
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Dokan Migrator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.061.79 ▲0.0344.12 ▼5.65
Dashboard /wp-admin2,206 ▲215.85 ▲0.03101.89 ▲0.1840.40 ▼5.49
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0539.49 ▲1.7336.96 ▲5.71
Add New Post /wp-admin/post-new.php1,533 ▼023.40 ▲0.17648.49 ▼31.5052.37 ▼9.92
Media Library /wp-admin/upload.php1,391 ▲64.16 ▼0.0195.71 ▼7.4942.82 ▼0.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • dokan_migrator_installed_time
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • dokan_migrator_plugin_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/dokan-migrator/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/dokan-migrator/vendor/appsero/client/.php-cs-fixer.dist.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/dokan-migrator/templates/app.php:2
    • > PHP Warning
      require_once(wp-content/plugins/dokan-migrator/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php): failed to open stream: No such file or directory in wp-content/plugins/dokan-migrator/vendor/appsero/client/.php-cs-fixer.dist.php on line 3

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 96% 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
3 plugin tags: multivendor marketplace, dokan, dokan migrator

dokan-migrator/dokan-migrator.php 92% from 13 tests

The principal PHP file in "Dokan Migrator" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.8" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,348 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP379542,6093,818
Markdown1820255
JSON300145
XML161195
YAML16032
CSS1002
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.77
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes26
▷ Abstract classes415.38%
▷ Concrete classes2284.62%
▷ Final classes14.55%
Methods291
▷ Static methods4415.12%
▷ Public methods24885.22%
▷ Protected methods103.44%
▷ Private methods3311.34%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants8
▷ Global constants8100.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
No PNG files were detected