56% gpt3-ai-content-generator

Code Review | AI Power: Complete AI Pack - Powered by GPT-4

WordPress plugin AI Power: Complete AI Pack - Powered by GPT-4 scored56%from 54 tests.

About plugin

  • Plugin page: gpt3-ai-content-g...
  • Plugin version: 1.8.13
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 7, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 466
  • Update frequency: every 0.8 days
  • Top authors: senols (100%)

Code review

54 tests

User reviews

132 reviews

Install metrics

10,000+ active /965,415 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲6.80MB] [CPU: ▲55.71ms] 50% from 4 tests

An overview of server-side resources used by AI Power: Complete AI Pack - Powered by GPT-4
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 10.50MB on /wp-admin/edit.php?page=wpaicg_single_content)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 6.80MB on /wp-admin/edit.php?page=wpaicg_single_content)
PageMemory (MB)CPU Time (ms)
Home /10.19 ▲6.72101.59 ▲59.78
Dashboard /wp-admin10.22 ▲6.87117.22 ▲51.00
Posts /wp-admin/edit.php10.22 ▲6.86120.18 ▲67.78
Add New Post /wp-admin/post-new.php12.66 ▲6.77155.07 ▲47.27
Media Library /wp-admin/upload.php10.09 ▲6.8698.69 ▲64.78
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius10.2299.36
Generate New Post /wp-admin/edit.php?page=wpaicg_single_content10.5097.31

Server storage [IO: ▲7.71MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 449 new files
Database: 12 new tables, 9 new options
New tables
wp_wpaicg_formtokens
wp_wpaicg_chatlogs
wp_wpaicg_form_logs
wp_wpaicg_prompttokens
wp_wpaicg_prompt_feedback
wp_wpaicg_chattokens
wp_wpaicg_form_feedback
wp_wpaicg
wp_wpaicg_imagetokens
wp_wpaicg_token_logs
...
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
fs_active_plugins
fs_accounts
fs_debug_mode
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for AI Power: Complete AI Pack - Powered by GPT-4
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,664 ▲91715.44 ▲0.736.02 ▲4.2733.11 ▼10.86
Dashboard /wp-admin2,962 ▲7846.69 ▲1.00123.79 ▲9.7097.82 ▲51.61
Posts /wp-admin/edit.php2,921 ▲8213.93 ▲1.9357.63 ▲22.4684.74 ▲50.49
Add New Post /wp-admin/post-new.php2,162 ▲62622.36 ▼0.77695.93 ▲25.4230.57 ▼21.48
Media Library /wp-admin/upload.php2,041 ▲6414.51 ▲0.2389.13 ▼10.6593.52 ▲48.79
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,8643.4447.5977.42
Generate New Post /wp-admin/edit.php?page=wpaicg_single_content5,0523.6655.1574.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/gpt3-ai-content-generator/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 12 tables in the database
    • wp_wpaicg_promptbase_logs
    • wp_wpaicg_form_feedback
    • wp_wpaicg_prompt_feedback
    • wp_wpaicg_image_logs
    • wp_wpaicg_imagetokens
    • wp_wpaicg_chattokens
    • wp_wpaicg_prompttokens
    • wp_wpaicg_token_logs
    • wp_wpaicg_formtokens
    • wp_wpaicg
    • ...
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • fs_debug_mode
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/gpt3-ai-content-generator/admin/partials/wp-ai-content-generator-admin-display.php
    • > /wp-content/plugins/gpt3-ai-content-generator/public/partials/wp-ai-content-generator-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gpt3-ai-content-generator/admin/views/settings/editor.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #10, #11, #12, #14, #15, #16, #17, #18, #20, #21, #22, #23, #24, #25, #26, #27, #28, #29, #30, #31, #32, #33, #34, #35, #36, #37, #38, #5, #6, #7, #8, #9 in gpt3-ai-content-generator/assets to your readme.txt
You can take inspiration from this readme.txt

gpt3-ai-content-generator/gpt3-ai-content-generator.php 92% from 13 tests

"AI Power: Complete AI Pack - Powered by GPT-4" version 1.8.13's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 253 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin100,027 lines of code in 382 files:
LanguageFilesBlank linesComment linesLines of code
PHP25710,11618,78581,248
JSON923013,966
JavaScript111851652,513
CSS22111712,300

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 174)
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity79.34
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity5.05
▷ Minimum method complexity1.00
▷ Maximum method complexity174.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes90
▷ Abstract classes22.22%
▷ Concrete classes8897.78%
▷ Final classes11.14%
Methods1,692
▷ Static methods27116.02%
▷ Public methods1,28575.95%
▷ Protected methods171.00%
▷ Private methods39023.05%
Functions128
▷ Named functions11589.84%
▷ Anonymous functions1310.16%
Constants152
▷ Global constants10267.11%
▷ Class constants5032.89%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 0.34MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/chatbot.png11.52KB3.99KB▼ 65.40%
admin/images/pro_img.png9.52KB8.17KB▼ 14.17%
(invalid) admin/images/default_profile.png1.29KB0.00KB▼ 100.00%
admin/images/twitter.png90.92KB89.32KB▼ 1.75%
admin/css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%