79% ai-writer

Code Review | AI Writer: Content Generator GPT | ChatGPT

WordPress plugin AI Writer: Content Generator GPT | ChatGPT scored79%from 54 tests.

About plugin

  • Plugin page: ai-writer
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Apr 19, 2023
  • Latest release: May 1, 2023
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: webfixlab (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /349 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.09ms] Passed 4 tests

Analyzing server-side resources used by AI Writer: Content Generator GPT | ChatGPT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1037.67 ▼1.07
Dashboard /wp-admin3.41 ▲0.1044.53 ▼4.14
Posts /wp-admin/edit.php3.52 ▲0.1646.46 ▼1.89
Add New Post /wp-admin/post-new.php5.99 ▲0.1079.01 ▼5.27
Media Library /wp-admin/upload.php3.33 ▲0.1036.57 ▲2.14
Settings /wp-admin/admin.php?page=aiwriter-settings3.3032.65
Generate Content /wp-admin/admin.php?page=ai-writer3.3636.00

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by AI Writer: Content Generator GPT | ChatGPT
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13413.66 ▼1.021.79 ▼0.0347.29 ▲0.55
Dashboard /wp-admin2,286 ▲985.94 ▲1.04101.51 ▼8.1654.75 ▲11.50
Posts /wp-admin/edit.php2,169 ▲772.00 ▲0.0039.38 ▲0.9934.08 ▼3.07
Add New Post /wp-admin/post-new.php1,587 ▲7323.08 ▲5.39755.19 ▲148.5164.16 ▲12.24
Media Library /wp-admin/upload.php1,468 ▲774.25 ▼0.0397.32 ▼3.4073.72 ▲27.07
Settings /wp-admin/admin.php?page=aiwriter-settings1,0332.1229.5833.19
Generate Content /wp-admin/admin.php?page=ai-writer1,7406.71131.9192.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ai-writer/templates/admin/popup.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aiwriter_settings_display_title() in wp-content/plugins/ai-writer/templates/admin/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-writer/includes/loader.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ai-writer/assets/php-css/dynamic-styles.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-writer/includes/admin-functions.php:330
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ai-writer/includes/core-data.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/ai-writer/templates/admin/template-parts/new-content.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ai-writer/templates/admin/sidebar.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/ai-writer/templates/admin/template-parts/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: content generator, chatgpt, ai, openai, chatbot...

ai-writer/ai-writer.php Passed 13 tests

The principal PHP file in "AI Writer: Content Generator GPT | ChatGPT" v. 1.1.1 is loaded by WordPress automatically on each request
60 characters long description:
A simple plugin that generates content using the OpenAI API.

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
Success! There were no dangerous files found in this plugin1,587 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS1110674
PHP12163276659
JavaScript22520171
SVG20283

PHP code Passed 2 tests

Analyzing 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.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/check-v.png1.58KB0.71KB▼ 55.16%