71% ai-content-writing-assistant

Code Review | AI Content Writing Assistant (Content Writer, GPT 3 & 4, ChatGPT, Image Generator) All in One

WordPress plugin AI Content Writing Assistant (Content Writer, GPT 3 & 4, ChatGPT, Image Generator) All in One scored71%from 54 tests.

About plugin

  • Plugin page: ai-content-writin...
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2023
  • Latest release: Jun 20, 2023
  • Number of updates: 44
  • Update frequency: every 3.3 days
  • Top authors: recorp (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

4,000+ active /21,370 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.34MB] [CPU: ▲9.14ms] Passed 4 tests

A check of server-side resources used by AI Content Writing Assistant (Content Writer, GPT 3 & 4, ChatGPT, Image Generator) All in One
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.79 ▲1.3348.26 ▲7.47
Dashboard /wp-admin4.63 ▲1.3360.04 ▲11.25
Posts /wp-admin/edit.php4.79 ▲1.4374.30 ▲23.66
Add New Post /wp-admin/post-new.php7.26 ▲1.38101.67 ▼1.71
Media Library /wp-admin/upload.php4.55 ▲1.3353.29 ▲19.54
GPT Playground /wp-admin/admin.php?page=chat-gpt-playground4.6959.12
Scheduled Content Generator /wp-admin/admin.php?page=scheduled-content-generator4.6754.11
Single Content Generator /wp-admin/admin.php?page=single-content-generator4.6561.58
AI Writing Assistant /wp-admin/admin.php?page=ai-writing-assistant4.6463.55
AI Image Generator /wp-admin/admin.php?page=ai-image-generator4.6046.97

Server storage [IO: ▲0.86MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 68 new files
Database: 1 new table, 9 new options
New tables
wp_ai_writing_assistant_sceduled_posts
New WordPress options
category_children
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
aiwa_notices
widget_recent-posts
aiwa_wp_plugin_activation_date

Browser metrics Passed 4 tests

This is an overview of browser requirements for AI Content Writing Assistant (Content Writer, GPT 3 & 4, ChatGPT, Image Generator) All in One
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲19013.26 ▼1.124.74 ▲2.6537.36 ▼13.22
Dashboard /wp-admin2,353 ▲1625.81 ▼0.02111.52 ▲5.9642.91 ▲3.68
Posts /wp-admin/edit.php5,247 ▲3,1587.67 ▲5.64213.51 ▲176.62114.46 ▲80.09
Add New Post /wp-admin/post-new.php9,239 ▲7,70328.06 ▲4.86957.22 ▲314.1744.37 ▼13.55
Media Library /wp-admin/upload.php1,535 ▲1474.08 ▼0.2692.26 ▼3.0547.78 ▲4.36
GPT Playground /wp-admin/admin.php?page=chat-gpt-playground4,9307.1178.39110.69
Scheduled Content Generator /wp-admin/admin.php?page=scheduled-content-generator4,9457.3990.99176.04
Single Content Generator /wp-admin/admin.php?page=single-content-generator4,59611.89197.93160.56
AI Writing Assistant /wp-admin/admin.php?page=ai-writing-assistant6,5777.1277.80140.05
AI Image Generator /wp-admin/admin.php?page=ai-image-generator1,9207.5369.10100.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • aiwa_notices
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • category_children
    • db_upgraded
    • aiwa_wp_plugin_activation_date
    • widget_recent-posts

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ai-content-writing-assistant/admin/includes/menu-pages/chatgpt-playground.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ai-content-writing-assistant/admin/includes/menu-pages/image-generator.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ai-content-writing-assistant/admin/includes/menu-pages/generate-single-post.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aiwa_languages_settings_items() in wp-content/plugins/ai-content-writing-assistant/admin/includes/tab/tab-pane/content-tab.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ai-content-writing-assistant/admin/includes/menu-pages/settings-page-display.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ai-content-writing-assistant/admin/includes/menu-pages/auto-content-writer.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-writing-assistant/admin/includes/save-image-to-gallery-modal.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WpWritingAssistant\\AjaxRequests\\add_action() in wp-content/plugins/ai-content-writing-assistant/admin/includes/ajax-requests/ajax-save-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-writing-assistant/admin/includes/cdata.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-writing-assistant/includes/global-functions.php:847
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-writing-assistant/admin/includes/title-suggestion-modal.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ai-image-generator
    • > Javascript (severe) in unknown
    /wp-content/plugins/ai-content-writing-assistant///admin/assets/js/ai-promptbox.js?ver=1.1.5 2718:10 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

ai-content-writing-assistant/ai-writing-assistant.php 62% from 13 tests

The main file in "AI Content Writing Assistant (Content Writer, GPT 3 & 4, ChatGPT, Image Generator) All in One" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ai-content-writing-assistant.php" instead of "ai-writing-assistant.php")
  • Description: The description should be shorter than 140 characters (currently 313 characters long)
  • 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
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 82 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected12,348 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP501,4778657,016
JavaScript98784763,456
CSS4201601,876

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity29.35
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods197
▷ Static methods00.00%
▷ Public methods12362.44%
▷ Protected methods6834.52%
▷ Private methods63.05%
Functions80
▷ Named functions7695.00%
▷ Anonymous functions45.00%
Constants96
▷ Global constants55.21%
▷ Class constants9194.79%
▷ Public constants91100.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 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/recorp-logo.png10.36KB3.47KB▼ 66.54%
admin/assets/images/arrow.png1.35KB0.43KB▼ 68.07%
admin/assets/images/cafe.png0.82KB0.96KB0.00%