74% wp-data-sync

Code Review | WP Data Sync

WordPress plugin WP Data Sync scored74%from 54 tests.

About plugin

  • Plugin page: wp-data-sync
  • Plugin version: 2.7.12
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 27, 2020
  • Latest release: Oct 23, 2023
  • Number of updates: 196
  • Update frequency: every 6.8 days
  • Top authors: Kevin Brent (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /13,569 total downloads

Benchmarks

Plugin footprint 65% 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.60MB] [CPU: ▲2.95ms] Passed 4 tests

This is a short check of server-side resources used by WP Data Sync
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6039.21 ▲3.17
Dashboard /wp-admin3.91 ▲0.6148.82 ▼0.95
Posts /wp-admin/edit.php3.96 ▲0.6051.07 ▲2.13
Add New Post /wp-admin/post-new.php6.53 ▲0.6499.22 ▲13.34
Media Library /wp-admin/upload.php3.83 ▲0.6040.39 ▲7.43
WP Data Sync /wp-admin/options-general.php?page=wp-data-sync3.7336.28

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 65 new files
Database: 1 new table, 9 new options
New tables
wp_data_sync_item_request
New WordPress options
widget_recent-posts
db_upgraded
WPDSYNC_VERSION
widget_theysaidso_widget
widget_recent-comments
wp_data_sync_post_title
wp_data_sync_post_status
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Data Sync
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▼0.011.76 ▲0.1940.38 ▼4.43
Dashboard /wp-admin2,198 ▲215.46 ▼0.0781.52 ▼6.9338.68 ▼2.40
Posts /wp-admin/edit.php2,106 ▲61.97 ▼0.0438.37 ▲1.9735.35 ▲0.12
Add New Post /wp-admin/post-new.php1,533 ▲523.03 ▼0.11614.30 ▼54.2255.08 ▼3.98
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0192.30 ▼3.7641.18 ▼6.73
WP Data Sync /wp-admin/options-general.php?page=wp-data-sync8771.9026.7048.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_data_sync_item_request
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wp_data_sync_post_title
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • WPDSYNC_VERSION
    • can_compress_scripts
    • wp_data_sync_post_status

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WP_DataSync\\App\\add_action() in wp-content/plugins/wp-data-sync/includes/functions/post-sync-status.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-data-sync/wp-data-sync.php 92% from 13 tests

This is the main PHP file of "WP Data Sync" version 2.7.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected4,239 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP592,2952,4644,184
CSS210555

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.88
▷ Minimum class complexity2.00
▷ Maximum class complexity118.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods235
▷ Static methods3213.62%
▷ Public methods23399.15%
▷ Protected methods00.00%
▷ Private methods20.85%
Functions54
▷ Named functions1324.07%
▷ Anonymous functions4175.93%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-32x32.png1.77KB1.21KB▼ 31.94%