62% ai-content-writer-chatgpt

Code Review | AI Content Writer - ChatGPT

WordPress plugin AI Content Writer - ChatGPT scored62%from 54 tests.

About plugin

  • Plugin page: ai-content-writer...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: May 8, 2023
  • Latest release: Aug 9, 2023
  • Number of updates: 10
  • Update frequency: every 9.6 days
  • Top authors: wisdomlogix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /698 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.88MB] [CPU: ▲14.73ms] Passed 4 tests

Server-side resources used by AI Content Writer - ChatGPT
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.0956.58 ▲12.78
Dashboard /wp-admin69.65 ▲0.2613,701,272.62 ▲9,323.17
Posts /wp-admin/edit.php4.56 ▲1.1671.13 ▲17.65
Add New Post /wp-admin/post-new.php7.04 ▲1.11110.18 ▲14.60
Media Library /wp-admin/upload.php4.35 ▲1.0756.64 ▲13.91
Settings /wp-admin/admin.php?page=acwc4.7958.92
Prompt Content Generator /wp-admin/admin.php?page=acwc_promptbase4.5750.91
Help /wp-admin/admin.php?page=acwc_help4.3452.00
AI Forms /wp-admin/admin.php?page=acwc_forms4.7055.94

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 102 new files
Database: 2 new tables, 8 new options
New tables
wp_acwc_form_logs
wp_acwc_promptbase_logs
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
acwc_activation_date
acwc_role_to_administrator
can_compress_scripts

Browser metrics Passed 4 tests

AI Content Writer - ChatGPT: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲29314.64 ▲0.411.77 ▼0.3442.17 ▼1.02
Dashboard /wp-admin2,458 ▲2806.55 ▲0.88128.29 ▲10.3598.54 ▲55.05
Posts /wp-admin/edit.php2,398 ▲2953.59 ▲1.5650.22 ▲7.9779.01 ▲41.98
Add New Post /wp-admin/post-new.php6,366 ▲4,84026.06 ▲2.90934.70 ▲233.0344.58 ▼8.66
Media Library /wp-admin/upload.php1,541 ▲1444.41 ▲0.2290.27 ▼20.3371.64 ▲21.62
Settings /wp-admin/admin.php?page=acwc2,8603.3441.6078.20
Prompt Content Generator /wp-admin/admin.php?page=acwc_promptbase2,6744.8764.62101.94
Help /wp-admin/admin.php?page=acwc_help1,2293.3339.7963.60
AI Forms /wp-admin/admin.php?page=acwc_forms2,6944.8858.7086.48

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

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 50 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=acwc_forms
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 50 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=acwc_forms
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 73 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=acwc_forms
    • > Notice in wp-content/plugins/ai-content-writer-chatgpt/backend/acwc_form_index.php+716
    Undefined index: response

SRP 0% 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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ai-content-writer-chatgpt/backend/acwc_help.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ai-content-writer-chatgpt/ai-content-writer-chatgpt.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-writer-chatgpt/includes/acwc-config.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-writer-chatgpt/includes/acwc-footer.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acwc_get_api_key_text_converted() in wp-content/plugins/ai-content-writer-chatgpt/backend/acwc-page.php:18

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

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

"AI Content Writer - ChatGPT" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
128 characters long description:
AI Gpt Content Generator - Content Generator,Content Writer, ChatGPT, Title Suggestions,Auto Content Writer with just one click.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin16,609 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP405344010,343
JSON474106,259
CSS4034
JavaScript3003

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 114)
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity41.14
▷ Minimum class complexity1.00
▷ Maximum class complexity220.00
Average method complexity5.49
▷ Minimum method complexity1.00
▷ Maximum method complexity114.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes14.76%
Methods182
▷ Static methods3418.68%
▷ Public methods17696.70%
▷ Protected methods00.00%
▷ Private methods63.30%
Functions16
▷ Named functions1275.00%
▷ Anonymous functions425.00%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assests/images/icon---.png3.02KB0.34KB▼ 88.75%
assests/images/icon.png0.44KB0.31KB▼ 29.87%
assests/images/icon----.png0.78KB0.75KB▼ 4.61%
assests/images/icon-old.png0.48KB0.32KB▼ 34.48%