74% woosplit-google-experiments-for-woocommerce

Code Review | WooSplit - Google Experiments for WooCommerce

WordPress plugin WooSplit - Google Experiments for WooCommerce scored 74% from 54 tests.

About plugin

  • Plugin page: woosplit-google-e...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.3
  • WordPress version: 6.3.1
  • First release: Jun 8, 2016
  • Latest release: Mar 9, 2017
  • Number of updates: 14
  • Update frequency: every 19.6 days
  • Top authors: shadim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 669 total downloads

Benchmarks

Plugin footprint 65% 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.79ms] Passed 4 tests

This is a short check of server-side resources used by WooSplit - Google Experiments for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.69 ▼4.22
Dashboard /wp-admin3.31 ▲0.0143.05 ▼10.69
Posts /wp-admin/edit.php3.36 ▲0.0049.83 ▼1.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.63 ▼6.36
Media Library /wp-admin/upload.php3.23 ▲0.0033.96 ▼0.55

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 2 new tables, 6 new options
New tables
wp_woocommerce_google_experiments
wp_woocommerce_google_experiments_triggers
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

WooSplit - Google Experiments for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼0.791.71 ▼0.1240.39 ▲0.53
Dashboard /wp-admin2,206 ▲185.90 ▲0.02106.22 ▲5.7342.18 ▲0.02
Posts /wp-admin/edit.php2,086 ▼02.01 ▼0.0140.01 ▲4.2935.18 ▲5.86
Add New Post /wp-admin/post-new.php1,534 ▲1423.22 ▲0.02662.95 ▼14.5265.90 ▲6.41
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.03103.34 ▲1.8046.44 ▲1.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_woocommerce_google_experiments
    • wp_woocommerce_google_experiments_triggers
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/woosplit-google-experiments-for-woocommerce/classes/class-wc-google-experiments.php on line 114
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/woosplit-google-experiments-for-woocommerce/classes/class-wc-google-experiments-table.php on line 75
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/woosplit-google-experiments-for-woocommerce/classes/class-wc-google-experiments-table.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woosplit-google-experiments-for-woocommerce/classes/includes/admin-screen-edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woosplit-google-experiments-for-woocommerce/classes/includes/admin-screen.php:4
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/woosplit-google-experiments-for-woocommerce/classes/class-wc-google-experiments-table.php on line 84

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce, ab testing, google experiments, ab split testing, google analytics

woosplit-google-experiments-for-woocommerce/wc-google-experiments.php 92% from 13 tests

The main PHP file in "WooSplit - Google Experiments for WooCommerce" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woosplit-google-experiments-for-woocommerce.php" instead of "wc-google-experiments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin622 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7191155599
CSS10021
Markdown1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.00
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/edit.png0.72KB0.69KB▼ 3.27%
assets/images/delete.png0.74KB0.46KB▼ 38.19%