84% auto-product-description-writer

Code Review | AI for WooCommerce

WordPress plugin AI for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: auto-product-desc...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2023
  • Latest release: Oct 19, 2023
  • Number of updates: 11
  • Update frequency: every 22.3 days
  • Top authors: momothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /536 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.18MB] [CPU: ▼2.44ms] Passed 4 tests

An overview of server-side resources used by AI for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.48 ▲1.57
Dashboard /wp-admin3.50 ▲0.1943.48 ▼2.54
Posts /wp-admin/edit.php3.61 ▲0.2545.74 ▼4.36
Add New Post /wp-admin/post-new.php6.11 ▲0.2280.92 ▼4.39
Media Library /wp-admin/upload.php3.42 ▲0.1938.27 ▲1.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for AI for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.37 ▲0.021.63 ▼0.4238.31 ▼0.35
Dashboard /wp-admin2,218 ▲385.52 ▼0.1481.82 ▼3.7039.55 ▼4.19
Posts /wp-admin/edit.php2,123 ▲232.05 ▲0.1039.12 ▲0.0635.17 ▲0.03
Add New Post /wp-admin/post-new.php1,556 ▲2818.16 ▼4.81633.84 ▼80.7881.28 ▲24.20
Media Library /wp-admin/upload.php1,423 ▲234.26 ▲0.1099.73 ▲3.8841.86 ▼2.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 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 take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-product-description-writer/class-momo-acg-for-woocommerce.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/auto-product-description-writer/includes/admin/pages/page-momo-acgwc-instructions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-product-description-writer/includes/admin/class-momo-acg-wc-admin-init.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/auto-product-description-writer/includes/admin/pages/momo-acg-wc-settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/auto-product-description-writer/includes/admin/metabox/class-momo-acg-wc-metabox.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/auto-product-description-writer/includes/admin/pages/page-momo-acgwc-openai.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-product-description-writer/includes/admin/class-momo-acg-wc-admin-ajax.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
6 plugin tags: gpt3, woocommerce, artificial intelligence, openai, auto product description writer...

auto-product-description-writer/class-momo-acg-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "AI for WooCommerce" version 1.1.1
Please take the time 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: Name the main plugin file the same as the plugin slug ("auto-product-description-writer.php" instead of "class-momo-acg-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin9,442 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS6104246,502
SVG2001,637
PHP11273351,122
JavaScript1014181

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity26.29
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods53
▷ Static methods00.00%
▷ Public methods53100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin