10% anytrack-for-woocommerce

Code Review | AnyTrack for WooCommerce

WordPress plugin AnyTrack for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: anytrack-for-wooc...
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2021
  • Latest release: Jun 18, 2023
  • Number of updates: 16
  • Update frequency: every 43.0 days
  • Top authors: anytrack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,707 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.43ms] Passed 4 tests

Server-side resources used by AnyTrack for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.46 ▼36.08
Dashboard /wp-admin2.05 ▼1.266.11 ▼45.88
Posts /wp-admin/edit.php2.05 ▼1.317.76 ▼42.44
Add New Post /wp-admin/post-new.php2.05 ▼3.845.98 ▼97.32
Media Library /wp-admin/upload.php2.05 ▼1.185.37 ▼31.71
AnyTrack /wp-admin/admin.php?page=waapmain_settings2.055.32

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

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

Browser metrics Passed 4 tests

A check of browser resources used by AnyTrack for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,707 ▼5415.12 ▲0.930.50 ▼1.1821.81 ▼20.16
Dashboard /wp-admin2,360 ▲1866.36 ▲0.83104.11 ▲7.5142.11 ▼2.50
Posts /wp-admin/edit.php2,288 ▲1883.57 ▲1.5946.61 ▲4.9231.22 ▼6.76
Add New Post /wp-admin/post-new.php1,529 ▼022.85 ▼0.28624.02 ▼32.6247.24 ▼2.97
Media Library /wp-admin/upload.php1,426 ▲264.28 ▲0.0883.18 ▼19.4744.32 ▼1.74
AnyTrack /wp-admin/admin.php?page=waapmain_settings1,1653.0942.4885.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • waap_options
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=waapmain_settings
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/anytrack-for-woocommerce/anytrack-for-woocommerce.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/anytrack-for-woocommerce/modules/hooks.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/anytrack-for-woocommerce/modules/settings.php:159
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/anytrack-for-woocommerce/modules/scripts.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

anytrack-for-woocommerce/anytrack-for-woocommerce.php Passed 13 tests

"AnyTrack for WooCommerce" version 1.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
115 characters long description:
Connect with Google, Facebook, Bing, Taboola and Outbrain and sync all your ad campaigns directly from WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin20,463 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
CSS61359110,988
SVG1002,671
JavaScript46015442,357
Sass1536361,796
LESS1536461,786
PHP622845865

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity24.75
▷ Minimum class complexity3.00
▷ Maximum class complexity64.00
Average method complexity7.33
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.02MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/images/logopng.png2.14KB2.25KB0.00%
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%