78% grow-with-woocommerce

Code Review | Grow Reports for WooCommerce

WordPress plugin Grow Reports for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: grow-with-woocomm...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Jan 27, 2016
  • Number of updates: 64
  • Update frequency: every 2.2 days
  • Top authors: raisonon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,361 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.67ms] Passed 4 tests

Analyzing server-side resources used by Grow Reports for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.35 ▲2.42
Dashboard /wp-admin3.38 ▲0.0754.51 ▲4.91
Posts /wp-admin/edit.php3.49 ▲0.1362.56 ▲6.17
Add New Post /wp-admin/post-new.php5.96 ▲0.07101.12 ▼10.81
Media Library /wp-admin/upload.php3.30 ▲0.0744.70 ▲6.91

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 249 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Grow Reports for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2614.35 ▲0.071.69 ▼0.3343.81 ▲2.80
Dashboard /wp-admin2,218 ▲445.62 ▼0.0489.94 ▼5.4439.71 ▼2.81
Posts /wp-admin/edit.php2,126 ▲262.15 ▲0.1544.70 ▲8.4840.34 ▲4.66
Add New Post /wp-admin/post-new.php1,551 ▲1623.41 ▲5.02647.27 ▼16.5561.56 ▲1.18
Media Library /wp-admin/upload.php1,423 ▲234.24 ▲0.07140.45 ▲36.8856.21 ▲12.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 11× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/index.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/simplefileupload.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/service-account.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/user-example.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/multi-api.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/idtoken.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/batch.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/emails/views/footer.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/simple-query.php
    • > /wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/examples/fileupload.php
  • 122× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Audit.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Urlshortener.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Cloudsearch.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/GamesConfiguration.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Drive.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/CloudMonitoring.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Pagespeedonline.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Books.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/TagManager.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/grow-with-woocommerce/includes/vendor/google-api-php-client/src/Google/Service/Resourceviews.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Requires at least: Invalid plugin version format
  • Tags: You are using too many tags: 39 tag instead of maximum 10
You can take inspiration from this readme.txt

grow-with-woocommerce/grow.php 92% from 13 tests

"Grow Reports for WooCommerce" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("grow-with-woocommerce.php" instead of "grow.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 plugin178,817 lines of code in 225 files:
LanguageFilesBlank linesComment linesLines of code
PHP20312,41635,093175,264
JavaScript75514772,274
CSS4171951,014
XML22841122
Markdown248075
JSON50040
YAML16222
INI1016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.30
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity1.04
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3,069
▷ Abstract classes100.33%
▷ Concrete classes3,05999.67%
▷ Final classes00.00%
Methods24,103
▷ Static methods540.22%
▷ Public methods23,98999.53%
▷ Protected methods310.13%
▷ Private methods830.34%
Functions16
▷ Named functions1275.00%
▷ Anonymous functions425.00%
Constants253
▷ Global constants10.40%
▷ Class constants25299.60%
▷ Public constants252100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/growl_med.png78.75KB24.32KB▼ 69.11%
assets/img/growl_little_small.png38.33KB13.41KB▼ 65.03%
assets/img/growl_400.png64.37KB21.50KB▼ 66.60%