78% wpcom-migration

Code Review | Move to WordPress.com

WordPress plugin Move to WordPress.com scored78%from 54 tests.

About plugin

  • Plugin page: wpcom-migration
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 1, 2023
  • Latest release: Nov 3, 2023
  • Number of updates: 19
  • Update frequency: every 13.6 days
  • Top authors: jetpackisbestpack (52.63%)jeherve (36.84%)wecanwang (10.53%)bjorsch (10.53%)zinigor (10.53%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /8,100 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.66MB] [CPU: ▲10.80ms] 75% from 4 tests

This is a short check of server-side resources used by Move to WordPress.com
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,060.69ms on /wp-admin/admin.php?page=my-jetpack)
PageMemory (MB)CPU Time (ms)
Home /7.41 ▲3.9548.64 ▲9.84
Dashboard /wp-admin5.82 ▲2.5158.92 ▲8.06
Posts /wp-admin/edit.php5.93 ▲2.5759.47 ▲12.01
Add New Post /wp-admin/post-new.php8.93 ▲3.05105.80 ▲13.27
Media Library /wp-admin/upload.php5.74 ▲2.5156.66 ▲23.41
VaultPress Backup /wp-admin/admin.php?page=jetpack-backup5.9148.58
My Jetpack /wp-admin/admin.php?page=my-jetpack6.581,060.69

Server storage [IO: ▲6.53MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 465 new files
Database: no new tables, 13 new options
New WordPress options
jetpack_backup_db_version
jetpack_sync_https_history_home_url
db_upgraded
can_compress_scripts
_upgrade_clear_disabled_plugin
widget_recent-posts
theysaidso_admin_options
jetpack_sync_https_history_site_url
widget_theysaidso_widget
jetpack_connection_active_plugins
...

Browser metrics Passed 4 tests

Checking browser requirements for Move to WordPress.com
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6114.75 ▲0.413.33 ▲1.3744.56 ▼1.72
Dashboard /wp-admin2,253 ▲825.71 ▲0.0389.95 ▼10.1937.48 ▼7.45
Posts /wp-admin/edit.php2,163 ▲632.19 ▲0.2040.83 ▲4.3131.96 ▼4.60
Add New Post /wp-admin/post-new.php1,555 ▲2923.45 ▲0.70634.27 ▼83.2656.12 ▼2.85
Media Library /wp-admin/upload.php1,461 ▲584.31 ▲0.14103.59 ▲9.4143.46 ▼3.01
VaultPress Backup /wp-admin/admin.php?page=jetpack-backup2,5067.90226.8272.58
My Jetpack /wp-admin/admin.php?page=my-jetpack1,26611.65215.3544.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 13 options
    • widget_theysaidso_widget
    • jetpack_options
    • db_upgraded
    • jetpack_sync_https_history_site_url
    • jetpack_sync_https_history_home_url
    • jetpack_sync_settings_disable
    • jetpack_backup_db_version
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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 fix the following items
  • 56× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-plugins-installer/src/class-automatic-install-skin.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum_Users' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-usermeta.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Product' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-boost.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-search.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\JSON_Deflate_Array_Codec' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-sync/src/class-simple-codec.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-sync/src/modules/class-meta.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-sync/src/modules/class-attachments.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-sync/src/modules/class-posts.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Hybrid_Product' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-videopress.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/wpcom-migration/jetpack_vendor/automattic/jetpack-sync/src/modules/class-options.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=my-jetpack
    • > Network (severe)
    index.php/wp-json/my-jetpack/v1/site/product-data?_locale=user - Failed to load resource: the server responded with a status of 400 (Bad Request)
    • > GET request to /wp-admin/admin.php?page=my-jetpack
    • > Network (severe)
    index.php/wp-json/my-jetpack/v1/site/purchases?_locale=user - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

wpcom-migration/wpcom-migration.php Passed 13 tests

The primary PHP file in "Move to WordPress.com" version 1.0.1 is used by WordPress to initiate all plugin functionality
76 characters long description:
A WordPress plugin that helps users to migrate their sites to WordPress.com.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected45,930 lines of code in 374 files:
LanguageFilesBlank linesComment linesLines of code
PHP2026,77422,89931,164
Markdown262,09906,800
JavaScript60258922,824
JSON24002,569
Sass16292601,575
JSX85416526
TypeScript73810234
SVG2113228
CSS100010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity23.28
▷ Minimum class complexity1.00
▷ Maximum class complexity294.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces22
Interfaces3
Traits0
Classes177
▷ Abstract classes42.26%
▷ Concrete classes17397.74%
▷ Final classes00.00%
Methods2,083
▷ Static methods81939.32%
▷ Public methods1,84688.62%
▷ Protected methods944.51%
▷ Private methods1436.87%
Functions54
▷ Named functions23.70%
▷ Anonymous functions5296.30%
Constants168
▷ Global constants95.36%
▷ Class constants15994.64%
▷ Public constants159100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 2.78MB with 0.83MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jetpack_vendor/automattic/jetpack-backup/src/js/hooks/assets/tim-ferriss-testimonial.png72.75KB61.68KB▼ 15.21%
jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png140.94KB52.80KB▼ 62.54%
jetpack_vendor/automattic/jetpack-backup/src/js/hooks/assets/ben-giordano-testimonial.png126.46KB133.65KB0.00%
jetpack_vendor/automattic/jetpack-backup/build/images/jetpack-backup-video-thumbnail-ad9a3ae22eca71d79a9e.png75.36KB81.95KB0.00%
build/images/migration-1-abe67ae953c8c28c4025.png264.73KB76.19KB▼ 71.22%