73% ai-content

Code Review | Text Prompter - Unlimited chatgpt text prompts for openai tasks

WordPress plugin Text Prompter - Unlimited chatgpt text prompts for openai tasks scored73%from 54 tests.

About plugin

  • Plugin page: ai-content
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Jan 31, 2023
  • Latest release: May 2, 2023
  • Number of updates: 15
  • Update frequency: every 6.1 days
  • Top authors: flippercode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,085 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Text Prompter - Unlimited chatgpt text prompts for openai tasks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6645.26 ▲7.79
Dashboard /wp-admin4.24 ▲0.9457.04 ▲0.09
Posts /wp-admin/edit.php4.35 ▲0.9953.01 ▼2.20
Add New Post /wp-admin/post-new.php6.77 ▲0.8995.62 ▼5.15
Media Library /wp-admin/upload.php4.16 ▲0.9345.07 ▲9.44

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 117 new files
Database: 1 new table, 6 new options
New tables
wp_wai_prompts
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text Prompter - Unlimited chatgpt text prompts for openai tasks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.48 ▼0.878.56 ▲6.9740.88 ▼0.33
Dashboard /wp-admin2,247 ▲705.64 ▲0.0981.28 ▼12.9978.81 ▲35.86
Posts /wp-admin/edit.php2,149 ▲491.99 ▼0.0432.82 ▼3.2334.10 ▼1.31
Add New Post /wp-admin/post-new.php1,583 ▲5523.12 ▼0.12616.10 ▼25.6135.35 ▼15.42
Media Library /wp-admin/upload.php1,446 ▲494.21 ▲0.01100.25 ▼14.6580.67 ▲33.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_wai_prompts
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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 | 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 take a closer look at the following
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Flippercode_Factory_Model' not found in wp-content/plugins/ai-content/classes/wai-model.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ai-content/modules/settings/views/test.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'FlipperCode_Model_Base' not found in wp-content/plugins/ai-content/modules/overview/model.overview.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ai-content/core/inc/modals/delete-bulk.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ai-content/core/inc/modals/custom-action.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WAI_FORM' not found in wp-content/plugins/ai-content/modules/overview/views/view.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ai-content/core/class.tabular.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'WAI_FORM' not found in wp-content/plugins/ai-content/modules/prompt/views/import.php:9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/ai-content/core/class.tabular.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'WAI_FORM' not found in wp-content/plugins/ai-content/modules/overview/views/how.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

ai-content/text-prompter.php 85% from 13 tests

The entry point to "Text Prompter - Unlimited chatgpt text prompts for openai tasks" version 1.0.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ai-content.php" instead of "text-prompter.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 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 detected17,842 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,6925048,500
PHP322,5551,6534,977
JavaScript58094984,365

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity49.27
▷ Minimum class complexity1.00
▷ Maximum class complexity375.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods215
▷ Static methods4621.40%
▷ Public methods18485.58%
▷ Protected methods125.58%
▷ Private methods198.84%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
65 PNG files occupy 0.43MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/back-skin/body-bg11.png0.22KB0.32KB0.00%
assets/images/white_select_arrow.png2.79KB0.17KB▼ 93.74%
assets/images/select_arrow.png2.79KB0.19KB▼ 93.22%
assets/images/arrow.png3.02KB0.54KB▼ 82.24%
assets/images/back-skin/body-bg15.png1.22KB1.26KB0.00%