84% verfacto

Code Review | Verfacto Marketing Analytics for WooCommerce

WordPress plugin Verfacto Marketing Analytics for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: verfacto
  • Plugin version: 1.0.18
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 14, 2021
  • Latest release: Sep 25, 2023
  • Number of updates: 41
  • Update frequency: every 15.9 days
  • Top authors: verfacto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,143 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Verfacto Marketing Analytics for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.71 ▼1.98
Dashboard /wp-admin3.31 ▲0.0041.94 ▼4.72
Posts /wp-admin/edit.php3.36 ▲0.0047.29 ▲3.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.81 ▼24.73
Media Library /wp-admin/upload.php3.23 ▲0.0032.73 ▼0.21

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Verfacto Marketing Analytics for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.80 ▲0.151.77 ▼0.0545.35 ▼2.93
Dashboard /wp-admin2,203 ▲154.87 ▼0.03100.49 ▼3.3337.38 ▼6.60
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0138.90 ▲0.6934.39 ▲0.43
Add New Post /wp-admin/post-new.php1,535 ▲2122.76 ▲5.08654.89 ▼37.0961.18 ▲4.30
Media Library /wp-admin/upload.php1,388 ▲64.18 ▲0.01102.09 ▲4.1544.33 ▲3.11

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/verfacto/includes/class-verfacto-plugin-deactivator.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/verfacto/admin/pages/verfacto-plugin-instalation-page.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/verfacto/includes/class-verfacto-plugin-handle-installation.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: analytics, catalog, shop

verfacto/verfacto-plugin.php 85% from 13 tests

The entry point to "Verfacto Marketing Analytics for WooCommerce" version 1.0.18 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("verfacto.php" instead of "verfacto-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,131 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13273556857
CSS1286203
JavaScript112371

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.22
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods58
▷ Static methods58.62%
▷ Public methods3763.79%
▷ Protected methods00.00%
▷ Private methods2136.21%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin