94% graphflow-analytics

Code Review | Predictive Marketing for WooCommerce

WordPress plugin Predictive Marketing for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: graphflow-analytics
  • Plugin version: 3.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.3
  • WordPress version: 5.9.2
  • First release: Aug 18, 2015
  • Latest release: Feb 1, 2016
  • Number of updates: 22
  • Update frequency: every 7.9 days
  • Top authors: graphflow (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 3,090 total downloads

Benchmarks

Plugin footprint Passed 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Predictive Marketing for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0259.02 ▲7.55
Dashboard /wp-admin3.43 ▲0.0237.70 ▲3.21
Posts /wp-admin/edit.php3.66 ▲0.0236.97 ▼1.69
Add New Post /wp-admin/post-new.php6.90 ▼0.0792.79 ▼1,164.48
Media Library /wp-admin/upload.php3.31 ▲0.0223.85 ▼1.67

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 71 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Predictive Marketing for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲5015.91 ▲0.345.90 ▼0.423.03 ▲0.21
Dashboard /wp-admin2,904 ▲436.13 ▲0.00121.57 ▼13.33161.27 ▲4.89
Posts /wp-admin/edit.php2,703 ▲153.23 ▼0.0062.65 ▼1.37139.67 ▼3.87
Add New Post /wp-admin/post-new.php1,674 ▼7818.81 ▼2.75402.91 ▼66.57152.47 ▼11.13
Media Library /wp-admin/upload.php1,707 ▲125.49 ▼0.04136.85 ▼1.40187.66 ▲0.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/classes/ActionScheduler_NullAction.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_LogEntry' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/classes/ActionScheduler_NullLogEntry.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/graphflow-analytics/includes/graphflow-admin-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/classes/ActionScheduler_SimpleSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/classes/ActionScheduler_IntervalSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/lib/cron-expression/CronExpression_MonthField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_product() in wp-content/plugins/graphflow-analytics/templates/email/recommended-product.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/graphflow-analytics/includes/action-scheduler/action-scheduler.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/graphflow-analytics/includes/action-scheduler/classes/ActionScheduler_CronSchedule.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
Attributes that need to be fixed:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

graphflow-analytics/woocommerce-graphflow.php 92% from 13 tests

"Predictive Marketing for WooCommerce" version 3.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("graphflow-analytics.php" instead of "woocommerce-graphflow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin6,048 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP569931,9065,668
Markdown21270234
JavaScript3141884
CSS110751
SVG10011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.93
▷ Minimum class complexity1.00
▷ Maximum class complexity168.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes41
▷ Abstract classes512.20%
▷ Concrete classes3687.80%
▷ Final classes00.00%
Methods339
▷ Static methods308.85%
▷ Public methods29988.20%
▷ Protected methods298.55%
▷ Private methods113.24%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants00.00%
▷ Class constants18100.00%
▷ Public constants18100.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/graphflow-logo.png15.82KB7.75KB▼ 50.99%
assets/graphflow-icon.png1.69KB1.20KB▼ 29.12%
assets/help.png0.30KB0.32KB0.00%