84% data-sync-x-by-wbsync

Code Review | Data Sync for Xero by Wbsync

WordPress plugin Data Sync for Xero by Wbsync scored 84% from 54 tests.

About plugin

  • Plugin page: data-sync-x-by-wb...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.3
  • WordPress version: 6.3.1
  • First release: May 25, 2020
  • Latest release: May 25, 2020
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: wbsync (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 2,315 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.17MB] [CPU: ▼0.92ms] Passed 4 tests

A check of server-side resources used by Data Sync for Xero by Wbsync
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.71 ▼1.62
Dashboard /wp-admin3.46 ▲0.1648.40 ▼0.85
Posts /wp-admin/edit.php3.58 ▲0.2249.53 ▼2.10
Add New Post /wp-admin/post-new.php6.06 ▲0.1890.52 ▲2.44
Media Library /wp-admin/upload.php3.39 ▲0.1636.82 ▲0.91

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Data Sync for Xero by Wbsync
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲17713.90 ▼0.789.48 ▲7.8630.84 ▼22.00
Dashboard /wp-admin2,213 ▲615.89 ▲0.22101.79 ▼5.1545.95 ▲3.38
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0636.75 ▼2.6936.35 ▲4.03
Add New Post /wp-admin/post-new.php1,523 ▼1123.65 ▲0.64614.16 ▲1.0365.68 ▲7.83
Media Library /wp-admin/upload.php1,392 ▲44.24 ▼0.00102.51 ▼6.2646.67 ▲5.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/data-sync-x-by-wbsync/public/partials/data-sync-x-woocommerce-public-display.php
    • > /wp-content/plugins/data-sync-x-by-wbsync/admin/partials/data-sync-x-woocommerce-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: accounting, woocommerce, integration, data sync, xero

data-sync-x-by-wbsync/data-sync-x-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Data Sync for Xero by Wbsync" version 1.0.0
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("data-sync-x-by-wbsync.php" instead of "data-sync-x-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,025 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12465557941
CSS2111978
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.57
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin