84% wp-migrate-db

Code Review | WP Migrate Lite - WordPress Migration Made Easy

WordPress plugin WP Migrate Lite - WordPress Migration Made Easy scored84%from 54 tests.

About plugin

  • Plugin page: wp-migrate-db
  • Plugin version: 2.6.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Dec 13, 2009
  • Latest release: Aug 29, 2023
  • Number of updates: 171
  • Update frequency: every 30.2 days
  • Top authors: deliciousbrains (68.42%)bradt (32.16%)

Code review

54 tests

User reviews

283 reviews

Install metrics

300,000+ active /6,375,804 total downloads

Benchmarks

Plugin footprint 82% 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: ▲3.56MB] [CPU: ▲16.07ms] Passed 4 tests

This is a short check of server-side resources used by WP Migrate Lite - WordPress Migration Made Easy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3740.16 ▲0.75
Dashboard /wp-admin7.93 ▲4.5876.47 ▲15.66
Posts /wp-admin/edit.php8.04 ▲4.6874.77 ▲28.10
Add New Post /wp-admin/post-new.php10.58 ▲4.69116.95 ▲19.76
Media Library /wp-admin/upload.php7.85 ▲4.6270.44 ▲35.41
WP Migrate /wp-admin/tools.php?page=wp-migrate-db8.3482.49

Server storage [IO: ▲4.85MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (1.44KB) outside of "wp-content/plugins/wp-migrate-db/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/wp-migrate-db-pro-compatibility.php
Filesystem: 398 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

WP Migrate Lite - WordPress Migration Made Easy: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.31 ▼0.041.51 ▼0.1543.07 ▲1.07
Dashboard /wp-admin2,199 ▲225.62 ▲0.0183.98 ▼4.0836.02 ▼3.85
Posts /wp-admin/edit.php2,083 ▼172.04 ▲0.0435.26 ▼1.8833.28 ▲1.33
Add New Post /wp-admin/post-new.php1,529 ▲323.16 ▲0.08607.17 ▼10.5979.39 ▲17.34
Media Library /wp-admin/upload.php1,404 ▲44.29 ▲0.06100.54 ▼8.5550.32 ▲8.21
WP Migrate /wp-admin/tools.php?page=wp-migrate-db1,08012.10160.54134.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 108× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\Definition' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/StringDefinition.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\CacheableDefinition' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/AliasDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\Source\\DefinitionArray' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/Source/DefinitionFile.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\Dotenv\\Repository\\Adapter\\AvailabilityInterface' not found in wp-content/plugins/wp-migrate-db/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/Resolver/ObjectCreator.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\Definition' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/ArrayDefinition.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/Resolver/DecoratorResolver.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'DeliciousBrains\\WPMDB\\Container\\DI\\Definition\\FactoryDefinition' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/php-di/src/DI/Definition/DecoratorDefinition.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Common\\Queue\\Connections\\ConnectionInterface' not found in wp-content/plugins/wp-migrate-db/class/Common/Queue/Connections/RedisConnection.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliciousBrains\\WPMDB\\Container\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/wp-migrate-db/vendor/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can look at the official readme.txt

wp-migrate-db/wp-migrate-db.php Passed 13 tests

Analyzing the main PHP file in "WP Migrate Lite - WordPress Migration Made Easy" version 2.6.9
137 characters long description:
Migrate your database. Export full sites including media, themes, and plugins. Find and replace content with support for serialized data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected23,654 lines of code in 368 files:
LanguageFilesBlank linesComment linesLines of code
PHP2604,17910,28620,713
Markdown1649701,173
JSON1200971
SVG5200239
JavaScript192639226
YAML140130
CSS414196
Sass112048
XML13324
HTML132018
make17016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.27
▷ Minimum class complexity1.00
▷ Maximum class complexity309.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces77
Interfaces32
Traits1
Classes204
▷ Abstract classes73.43%
▷ Concrete classes19796.57%
▷ Final classes73.55%
Methods1,407
▷ Static methods18212.94%
▷ Public methods1,23687.85%
▷ Protected methods483.41%
▷ Private methods1238.74%
Functions87
▷ Named functions3944.83%
▷ Anonymous functions4855.17%
Constants47
▷ Global constants612.77%
▷ Class constants4187.23%
▷ Public constants41100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.37MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
frontend/build-free/static/media/wp-migrate-2-6-0.8d26599e.png298.60KB353.12KB0.00%
frontend/build-free/static/media/testimonial-avatar.309cd834.png22.99KB8.23KB▼ 64.18%
vendor/container-interop/container-interop/docs/images/side_by_side_containers.png15.88KB8.43KB▼ 46.90%
vendor/container-interop/container-interop/docs/images/priority.png15.87KB8.86KB▼ 44.20%
vendor/container-interop/container-interop/docs/images/interoperating_containers.png25.13KB12.83KB▼ 48.97%