84% tcp-products-sync

Code Review | Products Sync for Woocommerce by TheCartPress

WordPress plugin Products Sync for Woocommerce by TheCartPress scored84%from 54 tests.

About plugin

  • Plugin page: tcp-products-sync
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2020
  • Latest release: Jan 13, 2021
  • Number of updates: 3
  • Update frequency: every 16.7 days
  • Top authors: tcpteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /426 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.28ms] Passed 4 tests

This is a short check of server-side resources used by Products Sync for Woocommerce by TheCartPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0052.54 ▲7.28
Dashboard /wp-admin3.31 ▲0.0049.28 ▼4.00
Posts /wp-admin/edit.php3.36 ▲0.0046.75 ▼5.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.46 ▼5.84
Media Library /wp-admin/upload.php3.23 ▲0.0034.92 ▼6.16

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Products Sync for Woocommerce by TheCartPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▼0.242.08 ▲0.0943.93 ▼3.89
Dashboard /wp-admin2,198 ▲185.66 ▼0.0496.13 ▼0.5141.87 ▼2.05
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0137.53 ▲2.7232.22 ▼4.58
Add New Post /wp-admin/post-new.php1,545 ▼023.05 ▼0.27649.61 ▼76.7748.28 ▼7.04
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.0294.76 ▼8.9440.09 ▼8.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tcp-products-sync/tcp-menu.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
You can look at the official readme.txt

tcp-products-sync/tcp-wcjsonsync.php 92% from 13 tests

The primary PHP file in "Products Sync for Woocommerce by TheCartPress" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tcp-products-sync.php" instead of "tcp-wcjsonsync.php")

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
Success! There were no dangerous files found in this plugin2,187 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP51421982,078
CSS28369
JavaScript16225
SVG10115

PHP code Passed 2 tests

An short overview of 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.64
Average class complexity97.20
▷ Minimum class complexity17.00
▷ Maximum class complexity303.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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