62% ai-comment-creator

Code Review | AI Comment Creator - GPT-4 Generate Comment, SEO Optimized, Organic Comments

WordPress plugin AI Comment Creator - GPT-4 Generate Comment, SEO Optimized, Organic Comments scored62%from 54 tests.

About plugin

  • Plugin page: ai-comment-creator
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 1, 2023
  • Latest release: Nov 26, 2023
  • Number of updates: 36
  • Update frequency: every 7.5 days
  • Top authors: berkbirkan (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

30+ active /2,152 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.89MB] [CPU: ▼28.61ms] Passed 4 tests

A check of server-side resources used by AI Comment Creator - GPT-4 Generate Comment, SEO Optimized, Organic Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5017.43 ▼21.87
Dashboard /wp-admin3.22 ▼0.0950.08 ▲4.17
Posts /wp-admin/edit.php3.14 ▼0.2225.91 ▼23.15
Add New Post /wp-admin/post-new.php3.14 ▼2.7523.77 ▼60.01
Media Library /wp-admin/upload.php3.14 ▼0.0922.64 ▼9.41
Manual Comment /wp-admin/admin.php?page=aicommentcreator_addComment3.1425.22
Automatic Comment /wp-admin/admin.php?page=aicommentcreator_automaticComment3.1421.25
AI Comment Creator /wp-admin/admin.php?page=aicommentcreator_menu3.1425.18

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for AI Comment Creator - GPT-4 Generate Comment, SEO Optimized, Organic Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4214.75 ▼0.011.53 ▼0.3036.88 ▼7.55
Dashboard /wp-admin2,214 ▲445.63 ▼0.0297.19 ▼13.8976.28 ▲34.09
Posts /wp-admin/edit.php2,137 ▲372.11 ▲0.1541.23 ▲5.8938.20 ▲3.38
Add New Post /wp-admin/post-new.php1,547 ▲2122.86 ▼0.63568.05 ▼101.0055.01 ▲2.77
Media Library /wp-admin/upload.php1,434 ▲314.23 ▲0.0699.03 ▲2.9145.20 ▲1.61
Manual Comment /wp-admin/admin.php?page=aicommentcreator_addComment1,2062.0734.5140.89
Automatic Comment /wp-admin/admin.php?page=aicommentcreator_automaticComment1,2192.0743.4339.69
AI Comment Creator /wp-admin/admin.php?page=aicommentcreator_menu9522.0728.1123.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aicommentcreator_menu
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aicommentcreator_automaticComment
    • > Notice in wp-content/plugins/ai-comment-creator/ai-comment-creator.php+1686
    Trying to access array offset on value of type bool

SRP 50% 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 fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-comment-creator/ai-comment-creator.php:704

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aicommentcreator_menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/ai-comment-creator/js/aicommentcreator.js?ver=6.3.1:106:12)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aicommentcreator_menu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aicommentcreator_menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'addEventListener')" "TypeError: Cannot read properties of null (reading 'addEventListener')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/ai-comment-creator/js/aicommentcreator.js?ver=6.3.1:116:18)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention: The official readme.txt is a good inspiration

ai-comment-creator/ai-comment-creator.php 85% from 13 tests

The entry point to "AI Comment Creator - GPT-4 Generate Comment, SEO Optimized, Organic Comments" version 1.1.9 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.2.0" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,028 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2506630804
CSS31914125
JavaScript119199

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.61MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-16.png1.20KB0.72KB▼ 39.79%
images/icon-ai-32.png2.77KB1.58KB▼ 42.99%
images/icon-ai-80px.png4.51KB2.13KB▼ 52.76%
images/icon-ai-25.png1.83KB1.28KB▼ 30.02%
images/icon-ai.png611.97KB230.74KB▼ 62.30%