64% instawp-connect

Code Review | InstaWP Connect - 1-click WP Staging & Migration

WordPress plugin InstaWP Connect - 1-click WP Staging & Migration scored64%from 54 tests.

About plugin

  • Plugin page: instawp-connect
  • Plugin version: 0.1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Nov 4, 2022
  • Latest release: Dec 1, 2023
  • Number of updates: 73
  • Update frequency: every 5.5 days
  • Top authors: instawp (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /21,061 total downloads

Benchmarks

Plugin footprint 48% 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: ▲1.64MB] [CPU: ▲12.53ms] Passed 4 tests

Server-side resources used by InstaWP Connect - 1-click WP Staging & Migration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.20 ▲1.7456.23 ▲16.92
Dashboard /wp-admin4.92 ▲1.5759.31 ▼1.65
Posts /wp-admin/edit.php4.95 ▲1.6067.30 ▲19.02
Add New Post /wp-admin/post-new.php7.69 ▲1.80111.61 ▲17.76
Media Library /wp-admin/upload.php4.87 ▲1.6452.82 ▲17.10
InstaWP /wp-admin/tools.php?page=instawp4.8358.98

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 127 new files
Database: 4 new tables, 10 new options
New tables
wp_instawp_events
wp_instawp_event_sites
wp_instawp_sync_history
wp_instawp_event_sync_logs
New WordPress options
can_compress_scripts
instawp_last_heartbeat_sent
instawp_sync_tab_roles
instawp_large_files_list
db_upgraded
widget_recent-posts
theysaidso_admin_options
instawp_default_user
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for InstaWP Connect - 1-click WP Staging & Migration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9414.73 ▲0.391.76 ▼0.4337.08 ▼13.93
Dashboard /wp-admin2,257 ▲774.95 ▼0.63102.80 ▲5.1741.51 ▼1.02
Posts /wp-admin/edit.php2,162 ▲592.40 ▲0.4341.26 ▲0.2135.70 ▲3.19
Add New Post /wp-admin/post-new.php1,581 ▲5523.23 ▲0.10578.48 ▼43.9327.87 ▼25.27
Media Library /wp-admin/upload.php1,456 ▲594.51 ▲0.3299.40 ▲1.8241.33 ▲0.91
InstaWP /wp-admin/tools.php?page=instawp1,4312.5754.9250.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/instawp-connect/uninstall.php+96
    Constant INSTAWP_MAIN_SCHEDULE_EVENT already defined
  • The uninstall procedure failed, leaving 4 tables in the database
    • wp_instawp_sync_history
    • wp_instawp_events
    • wp_instawp_event_sync_logs
    • wp_instawp_event_sites
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • instawp_default_user
    • widget_recent-comments
    • instawp_last_heartbeat_sent
    • widget_theysaidso_widget
    • db_upgraded
    • instawp_sync_tab_roles
    • can_compress_scripts
    • theysaidso_admin_options

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/instawp-connect/migrate/templates/main-migrate.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'InstaWP_Setting' not found in wp-content/plugins/instawp-connect/migrate/templates/navbar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/instawp-connect/migrate/templates/part-create-error.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'InstaWP_Setting' not found in wp-content/plugins/instawp-connect/migrate/templates/part-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'InstaWP_Setting' not found in wp-content/plugins/instawp-connect/migrate/templates/part-create.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/instawp-connect/migrate/templates/ajax/part-sync-items.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/instawp-connect/includes/class-instawp-cli.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'InstaWP_Sync_Admin' not found in wp-content/plugins/instawp-connect/migrate/templates/part-sync.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function instawp() in wp-content/plugins/instawp-connect/migrate/templates/main.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'InstaWP_Setting' not found in wp-content/plugins/instawp-connect/migrate/templates/part-manage.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: staging, backup, clone, migrate, restore

instawp-connect/instawp-connect.php Passed 13 tests

This is the main PHP file of "InstaWP Connect - 1-click WP Staging & Migration" version 0.1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
53 characters long description:
1-click WP Staging with Sync. Manage your Live sites.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin17,595 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP642,3771,96310,539
CSS12352932,788
JSON2202,631
JavaScript5229661,252
SVG3010278
Sass1120106
Markdown1001

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 160)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.38
▷ Minimum class complexity1.00
▷ Maximum class complexity245.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity160.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods419
▷ Static methods10424.82%
▷ Public methods39894.99%
▷ Protected methods40.95%
▷ Private methods174.06%
Functions54
▷ Named functions3259.26%
▷ Anonymous functions2240.74%
Constants73
▷ Global constants7298.63%
▷ Class constants11.37%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
migrate/assets/images/check-icon.png0.97KB0.73KB▼ 25.35%
migrate/assets/images/logo.png3.64KB2.36KB▼ 35.15%
migrate/assets/images/globe-icon.png0.59KB0.40KB▼ 32.29%
migrate/assets/images/createsite.png21.51KB8.63KB▼ 59.89%