84% copycraft

Code Review | CopyCraft: AI-Powered WooCommerce Product Descriptions Using OpenAI GPT-3

WordPress plugin CopyCraft: AI-Powered WooCommerce Product Descriptions Using OpenAI GPT-3 scored84%from 54 tests.

About plugin

  • Plugin page: copycraft
  • Plugin version: 0.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2023
  • Latest release: Jan 24, 2023
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: om4 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,316 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.24ms] Passed 4 tests

Analyzing server-side resources used by CopyCraft: AI-Powered WooCommerce Product Descriptions Using OpenAI GPT-3
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.09 ▲5.58
Dashboard /wp-admin3.40 ▲0.0646.66 ▼12.39
Posts /wp-admin/edit.php3.46 ▲0.1047.03 ▲4.19
Add New Post /wp-admin/post-new.php5.99 ▲0.1081.27 ▼5.13
Media Library /wp-admin/upload.php3.33 ▲0.1034.70 ▲0.39
CopyCraft /wp-admin/options-general.php?page=copycraft_options3.2931.07

Server storage [IO: ▲0.57MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 285 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CopyCraft: AI-Powered WooCommerce Product Descriptions Using OpenAI GPT-3
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.25 ▼0.091.67 ▲0.0342.27 ▼1.18
Dashboard /wp-admin2,193 ▲165.52 ▼0.1588.24 ▲4.2538.58 ▼4.87
Posts /wp-admin/edit.php2,107 ▲71.97 ▲0.0033.21 ▼3.1329.31 ▼3.24
Add New Post /wp-admin/post-new.php1,531 ▲323.46 ▲0.29657.49 ▲5.4650.88 ▲0.89
Media Library /wp-admin/upload.php1,401 ▲74.25 ▲0.02102.43 ▲1.4643.60 ▲2.21
CopyCraft /wp-admin/options-general.php?page=copycraft_options8002.1523.2625.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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 everything seems fine, this is not 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
  • 202× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OM4\\CopyCraft\\Vendor\\Tectalic\\OpenAi\\Models\\AbstractModel' not found in wp-content/plugins/copycraft/includes/Vendor/Tectalic/OpenAi/Models/FineTunesCancel/CancelFineTuneResponseResultFilesItem.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'OM4\\CopyCraft\\Vendor\\Tectalic\\OpenAi\\Models\\AbstractModel' not found in wp-content/plugins/copycraft/includes/Vendor/Tectalic/OpenAi/Models/FineTunes/CreateRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'OM4\\CopyCraft\\Vendor\\Http\\Message\\Encoding\\FilteredStream' not found in wp-content/plugins/copycraft/includes/Vendor/Http/Message/Encoding/DecompressStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WpOrg\\Requests\\Exception' not found in wp-content/plugins/copycraft/includes/Vendor/Art4/Requests/Exception/Psr/NetworkException.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'OM4\\CopyCraft\\Vendor\\Psr\\Http\\Message\\ServerRequestInterface' not found in wp-content/plugins/copycraft/includes/Vendor/Nyholm/Psr7/ServerRequest.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'OM4\\CopyCraft\\Vendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/copycraft/includes/Vendor/Http/Message/Stream/BufferedStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'OM4\\CopyCraft\\Vendor\\Http\\Message\\Formatter' not found in wp-content/plugins/copycraft/includes/Vendor/Http/Message/Formatter/CurlCommandFormatter.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'OM4\\CopyCraft\\Vendor\\Tectalic\\OpenAi\\Models\\UnstructuredModel' not found in wp-content/plugins/copycraft/includes/Vendor/Tectalic/OpenAi/Models/FineTunesCancel/CancelFineTuneResponseResultFilesItemStatusDetails.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'OM4\\CopyCraft\\Vendor\\Tectalic\\OpenAi\\Models\\AbstractModel' not found in wp-content/plugins/copycraft/includes/Vendor/Tectalic/OpenAi/Models/Models/RetrieveResponse.php:14
    • > PHP Fatal error
      Trait 'OM4\\CopyCraft\\Vendor\\Http\\Message\\Decorator\\MessageDecorator' not found in wp-content/plugins/copycraft/includes/Vendor/Http/Message/Decorator/ResponseDecorator.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: ai, woocommerce, gpt-3, openai, copywriting

copycraft/copycraft.php 92% from 13 tests

The entry point to "CopyCraft: AI-Powered WooCommerce Product Descriptions Using OpenAI GPT-3" version 0.2.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.9" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected9,261 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
PHP2816548,2129,192
JavaScript17553
CSS13116

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.19
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces55
Interfaces46
Traits9
Classes222
▷ Abstract classes83.60%
▷ Concrete classes21496.40%
▷ Final classes14768.69%
Methods885
▷ Static methods687.68%
▷ Public methods77187.12%
▷ Protected methods364.07%
▷ Private methods788.81%
Functions27
▷ Named functions518.52%
▷ Anonymous functions2281.48%
Constants86
▷ Global constants00.00%
▷ Class constants86100.00%
▷ Public constants2023.26%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin