73% ai-content-x

Code Review | AI Content X: GPT-3 Content Generator

WordPress plugin AI Content X: GPT-3 Content Generator scored73%from 54 tests.

About plugin

  • Plugin page: ai-content-x
  • Plugin version: 2.0.3
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Jan 7, 2023
  • Number of updates: 14
  • Update frequency: every 0.7 days
  • Top authors: jodacame (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /1,571 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.13ms] Passed 4 tests

A check of server-side resources used by AI Content X: GPT-3 Content Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.87 ▲1.78
Dashboard /wp-admin3.44 ▲0.1344.28 ▼1.78
Posts /wp-admin/edit.php3.49 ▲0.1345.05 ▼6.52
Add New Post /wp-admin/post-new.php6.04 ▲0.1583.23 ▼25.98
Media Library /wp-admin/upload.php3.36 ▲0.1336.89 ▲2.32
OpenAI Settings /wp-admin/admin.php?page=ai-content-x-openai-settings3.3442.18
Settings /wp-admin/admin.php?page=ai-content-x3.3330.52
Queue & Logs /wp-admin/admin.php?page=ai-content-x-logs3.3331.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 48 new files
Database: 1 new table, 8 new options
New tables
wp_ai_content_x_logs
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
ai_content_x
widget_recent-comments
ai_content_x_openai

Browser metrics Passed 4 tests

AI Content X: GPT-3 Content Generator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.55 ▼0.831.69 ▲0.0933.66 ▼6.36
Dashboard /wp-admin2,301 ▲1105.93 ▲0.0399.29 ▼1.1884.31 ▲40.04
Posts /wp-admin/edit.php2,198 ▲1092.16 ▲0.1236.26 ▼1.8735.21 ▲2.16
Add New Post /wp-admin/post-new.php6,479 ▲4,94627.76 ▲4.75919.59 ▲244.3639.50 ▼15.53
Media Library /wp-admin/upload.php1,477 ▲924.14 ▼0.0796.70 ▼14.2586.59 ▲41.59
OpenAI Settings /wp-admin/admin.php?page=ai-content-x-openai-settings1,0192.0828.0036.81
Settings /wp-admin/admin.php?page=ai-content-x9512.0324.1751.40
Queue & Logs /wp-admin/admin.php?page=ai-content-x-logs9062.0328.1132.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_ai_content_x_logs
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • ai_content_x_openai
    • ai_content_x
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/custom-fields/Post.class.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/Ajax.class.php:12
    • > PHP Warning
      require_once(AICX_PRO_PLUGIN_PATHadmin/inc/pages/Logs.class.php): failed to open stream: No such file or directory in wp-content/plugins/ai-content-x/admin/inc/Menus.class.php on line 10
    • > PHP Warning
      Use of undefined constant AICX_PRO_PLUGIN_PATH - assumed 'AICX_PRO_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ai-content-x/admin/inc/Menus.class.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/Language.class.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/Assets.class.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/pages/OpenAI-Settings.class.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'AICX_PRO_PLUGIN_PATHadmin/inc/pages/Logs.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/ai-content-x/admin/inc/Menus.class.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/Process.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Jodacame' not found in wp-content/plugins/ai-content-x/admin/inc/Defaults.class.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: openai, seo, gpt3, artificial intelligence, content creation...

ai-content-x/index.php 77% from 13 tests

The main PHP file in "AI Content X: GPT-3 Content Generator" ver. 2.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ai-content-x.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 272 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected3,225 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP295859302,467
CSS1266571
JavaScript122171
SVG10016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods184
▷ Static methods179.24%
▷ Public methods18399.46%
▷ Protected methods00.00%
▷ Private methods10.54%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/others.png16.95KB6.66KB▼ 60.71%
assets/img/settings.png17.09KB6.76KB▼ 60.41%
assets/img/no-image.png63.34KB24.15KB▼ 61.87%
assets/img/icon-color-64.png5.42KB3.13KB▼ 42.27%
assets/img/icon-color-128.png15.44KB7.17KB▼ 53.56%