78% ai-post-generator

Code Review | AI Post Generator | AutoWriter

WordPress plugin AI Post Generator | AutoWriter scored78%from 54 tests.

About plugin

  • Plugin page: ai-post-generator
  • Plugin version: 3.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 6, 2022
  • Latest release: Jun 29, 2023
  • Number of updates: 106
  • Update frequency: every 1.9 days
  • Top authors: kekotron (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /16,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼12.11ms] Passed 4 tests

Analyzing server-side resources used by AI Post Generator | AutoWriter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.25 ▼0.2223.59 ▼15.12
Dashboard /wp-admin3.53 ▲0.1946.74 ▼14.71
Posts /wp-admin/edit.php3.64 ▲0.2950.11 ▼1.48
Add New Post /wp-admin/post-new.php6.13 ▲0.2588.72 ▼17.11
Media Library /wp-admin/upload.php3.45 ▲0.2343.27 ▲5.58
Training model /wp-admin/admin.php?page=autowriter_training_model3.4334.37
Academy /wp-admin/admin.php?page=autowriter_academy3.4333.99
Settings /wp-admin/admin.php?page=autowriter_settings3.4341.40
New Post /wp-admin/admin.php?page=ai_post_generator3.4535.46
Upgrade Plan /wp-admin/admin.php?page=autowriter_upgrade_plan3.44290.97

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AI Post Generator | AutoWriter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,324 ▲57812.84 ▼1.814.08 ▲2.3945.56 ▲5.03
Dashboard /wp-admin2,372 ▲1805.84 ▲0.9197.66 ▼6.5896.79 ▲53.29
Posts /wp-admin/edit.php2,261 ▲1722.17 ▲0.1538.11 ▲0.2040.42 ▲5.67
Add New Post /wp-admin/post-new.php1,779 ▲25122.62 ▼0.52651.58 ▼30.4435.29 ▼15.13
Media Library /wp-admin/upload.php1,555 ▲1674.27 ▲0.04102.01 ▼7.6067.32 ▲21.87
Training model /wp-admin/admin.php?page=autowriter_training_model1,3982.6953.6832.47
Academy /wp-admin/admin.php?page=autowriter_academy1,60013.06245.3029.04
Settings /wp-admin/admin.php?page=autowriter_settings1,2532.3530.8832.72
New Post /wp-admin/admin.php?page=ai_post_generator2,1283.8676.5327.61
Upgrade Plan /wp-admin/admin.php?page=autowriter_upgrade_plan1,4727.59305.2232.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(AI_POST_GENERATOR_PLUGIN_DIR/functions.php): failed to open stream: No such file or directory in wp-content/plugins/ai-post-generator/inc/insert-head.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ai-post-generator/index.php:137
    • > PHP Warning
      Use of undefined constant AI_POST_GENERATOR_PLUGIN_DIR - assumed 'AI_POST_GENERATOR_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ai-post-generator/inc/insert-head.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'AI_POST_GENERATOR_PLUGIN_DIR/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/ai-post-generator/inc/insert-head.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=autowriter_upgrade_plan
    • > Javascript (severe) in unknown
    https://js.stripe.com/v3/ 0:395020 Uncaught t: Live Stripe.js integrations must use HTTPS. For mo…ation: https://stripe.com/docs/security/guide#tls

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: You can take inspiration from this readme.txt

ai-post-generator/index.php 92% from 13 tests

The entry point to "AI Post Generator | AutoWriter" version 3.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ai-post-generator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected4,481 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP91,8231011,879
JavaScript113,0791041,799
CSS71,79829778
SVG10125

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions40
▷ Named functions3997.50%
▷ Anonymous functions12.50%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/banner-772x250.png62.51KB20.48KB▼ 67.23%