78% local-sync

Code Review | WP Duplicate - WordPress Migration Plugin

WordPress plugin WP Duplicate - WordPress Migration Plugin scored78%from 54 tests.

About plugin

  • Plugin page: local-sync
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2020
  • Latest release: Sep 21, 2023
  • Number of updates: 29
  • Update frequency: every 45.6 days
  • Top authors: localsync (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /4,770 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
Installer ran successfully

Server metrics [RAM: ▲2.22MB] [CPU: ▲32.22ms] Passed 4 tests

Analyzing server-side resources used by WP Duplicate - WordPress Migration Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.73 ▲2.2686.25 ▲37.42
Dashboard /wp-admin5.56 ▲2.2591.69 ▲38.47
Posts /wp-admin/edit.php5.61 ▲2.2582.50 ▲30.64
Add New Post /wp-admin/post-new.php8.09 ▲2.21122.08 ▲22.35
Media Library /wp-admin/upload.php5.42 ▲2.1974.29 ▲38.55

Server storage [IO: ▲2.11MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 78 new files
Database: 7 new tables, 6 new options
New tables
wp_local_sync_delete_list
wp_local_sync_processed_iterator
wp_local_sync_local_site_files
wp_local_sync_current_process
wp_local_sync_local_site_new_attachments
wp_local_sync_inc_exc_contents
wp_local_sync_options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Duplicate - WordPress Migration Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲11613.64 ▼0.718.15 ▲6.5142.19 ▼2.86
Dashboard /wp-admin2,225 ▲515.87 ▲0.3290.80 ▼2.4047.11 ▲3.32
Posts /wp-admin/edit.php2,135 ▲352.50 ▲0.5239.78 ▲3.3031.87 ▼1.00
Add New Post /wp-admin/post-new.php1,564 ▲3822.33 ▼0.85711.07 ▲6.2137.97 ▼25.64
Media Library /wp-admin/upload.php1,433 ▲334.54 ▲0.27105.19 ▼8.0044.13 ▼3.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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
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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/local-sync/public/partials/local-sync-public-display.php
    • > /wp-content/plugins/local-sync/admin/partials/local-sync-admin-display.php
    • > /wp-content/plugins/local-sync/local-sync-bridge/index.php
  • 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-zip-facade.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 36
    • > PHP Warning
      include_once(wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-file-iterator.php): failed to open stream: No such file or directory in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 41
    • > PHP Fatal error
      Uncaught Error: Class 'Local_Sync_Constants' not found in wp-content/plugins/local-sync/local-sync-bridge/index.php:61
    • > PHP Warning
      include_once(): Failed opening 'wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-exclude-option.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 39
    • > PHP Warning
      include_once(): Failed opening 'wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-replace-db-links.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 38
    • > PHP Warning
      include_once(wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-replace-db-links.php): failed to open stream: No such file or directory in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 38
    • > PHP Warning
      include_once(): Failed opening 'wp-content/plugins/local-sync/local-sync-bridge/wp-tc-config.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 26
    • > PHP Warning
      include_once(wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-zip-facade.php): failed to open stream: No such file or directory in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 36
    • > PHP Warning
      include_once(wp-content/plugins/local-sync/local-sync-bridge/admin/class-local-sync-exclude-option.php): failed to open stream: No such file or directory in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 39
    • > PHP Warning
      include_once(wp-content/plugins/local-sync/local-sync-bridge/includes/class-local-sync-options.php): failed to open stream: No such file or directory in wp-content/plugins/local-sync/local-sync-bridge/index.php on line 43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #2 (Live Site settings page.) image missing
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt might help

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

This is the main PHP file of "WP Duplicate - WordPress Migration Plugin" version 1.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Easily migrate your WordPress Site from one host to another.

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
Success! There were no dangerous files found in this plugin23,208 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP446,0537,33617,562
JavaScript86021,6764,468
CSS51271341,167
SVG10011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity78.08
▷ Minimum class complexity1.00
▷ Maximum class complexity716.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods782
▷ Static methods40.51%
▷ Public methods68387.34%
▷ Protected methods30.38%
▷ Private methods9612.28%
Functions131
▷ Named functions131100.00%
▷ Anonymous functions00.00%
Constants211
▷ Global constants19692.89%
▷ Class constants157.11%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.22MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
local-sync-bridge/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
local-sync-bridge/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
local-sync-bridge/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/screenshot-1.png173.46KB44.23KB▼ 74.50%
assets/icon-128x128.png6.33KB3.14KB▼ 50.43%