84% shopmagic-for-google-sheets

Code Review | ShopMagic for Google Sheets

WordPress plugin ShopMagic for Google Sheets scored84%from 54 tests.

About plugin

  • Plugin page: shopmagic-for-goo...
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4
  • WordPress version: 6.3.1
  • First release: Nov 15, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 37
  • Update frequency: every 19.9 days
  • Top authors: wpdesk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,996 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▲1.08ms] Passed 4 tests

A check of server-side resources used by ShopMagic for Google Sheets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6145.78 ▲1.42
Dashboard /wp-admin3.90 ▲0.6050.31 ▲0.23
Posts /wp-admin/edit.php3.95 ▲0.6050.37 ▲2.21
Add New Post /wp-admin/post-new.php6.48 ▲0.6088.85 ▲0.44
Media Library /wp-admin/upload.php3.82 ▲0.6045.96 ▲13.75

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 819 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
wpdesk_requirements_plugins_data
plugin_activation_shopmagic-for-google-sheets/shopmagic-for-google-sheets.php
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ShopMagic for Google Sheets
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.18 ▼0.161.77 ▲0.0745.24 ▲2.19
Dashboard /wp-admin2,198 ▲185.61 ▼0.0689.49 ▼2.9242.70 ▼0.32
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0441.59 ▲3.2738.07 ▲0.91
Add New Post /wp-admin/post-new.php1,529 ▲323.39 ▲0.18689.43 ▲49.7153.82 ▲1.32
Media Library /wp-admin/upload.php1,406 ▲124.21 ▼0.02113.53 ▼1.5146.34 ▲2.95

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • plugin_activation_shopmagic-for-google-sheets/shopmagic-for-google-sheets.php

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 | 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
Please take a closer look at the following
  • 550× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Model' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Sheets/Padding.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Monolog\\Handler\\Handler' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/monolog/monolog/src/Monolog/Handler/NullHandler.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Collection' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Sheets/BasicFilter.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicGoogleSheetsVendor\\Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/monolog/monolog/src/Monolog/Processor/TagProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Model' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Drive/DriveFileLinkShareMetadata.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Collection' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Drive/ReplyList.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Model' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Sheets/RefreshDataSourceObjectExecutionStatus.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Model' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Sheets/CopyPasteRequest.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicGoogleSheetsVendor\\Psr\\Log\\LoggerInterface' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/monolog/monolog/src/Monolog/Logger.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicGoogleSheetsVendor\\Google\\Collection' not found in wp-content/plugins/shopmagic-for-google-sheets/vendor_prefixed/google/apiclient-services/src/Sheets/BasicChartSeries.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: wordpress google sheets, woocommerce to google sheet, integrate google sheets, woocommerce google sheets, google sheets integration

shopmagic-for-google-sheets/shopmagic-for-google-sheets.php 92% from 13 tests

This is the main PHP file of "ShopMagic for Google Sheets" version 2.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin44,421 lines of code in 810 files:
LanguageFilesBlank linesComment linesLines of code
PHP7801,83635,49743,108
JSON26001,177
CSS219283
JavaScript21053

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.77
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces70
Interfaces78
Traits16
Classes671
▷ Abstract classes131.94%
▷ Concrete classes65898.06%
▷ Final classes497.45%
Methods5,084
▷ Static methods2414.74%
▷ Public methods4,54489.38%
▷ Protected methods1903.74%
▷ Private methods3506.88%
Functions169
▷ Named functions2715.98%
▷ Anonymous functions14284.02%
Constants261
▷ Global constants41.53%
▷ Class constants25798.47%
▷ Public constants21884.82%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.10MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/flexibleshipping.com.png5.63KB3.68KB▼ 34.58%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/logo@2x.png4.17KB4.47KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.pl.png2.36KB2.43KB0.00%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/octolize.com.png88.91KB39.07KB▼ 56.06%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/wpdesk.net.png2.36KB2.43KB0.00%