84% ai-reply

Code Review | AI Reply

WordPress plugin AI Reply scored84%from 54 tests.

About plugin

  • Plugin page: ai-reply
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 6, 2023
  • Latest release: Jun 19, 2023
  • Number of updates: 8
  • Update frequency: every 1.6 days
  • Top authors: bensonruan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.14ms] Passed 4 tests

Server-side resources used by AI Reply
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.10 ▼2.75
Dashboard /wp-admin3.32 ▲0.0144.92 ▼10.99
Posts /wp-admin/edit.php3.37 ▲0.0146.49 ▼5.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.56 ▲1.24
Media Library /wp-admin/upload.php3.24 ▲0.0135.53 ▼1.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AI Reply
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8514.47 ▲0.091.74 ▼0.2847.82 ▼1.53
Dashboard /wp-admin2,226 ▲354.85 ▼1.06110.43 ▼5.6641.80 ▼3.87
Posts /wp-admin/edit.php2,105 ▲162.03 ▼0.0139.56 ▲5.3434.61 ▼2.60
Add New Post /wp-admin/post-new.php1,527 ▼617.78 ▼5.59641.02 ▼50.6363.58 ▲3.17
Media Library /wp-admin/upload.php1,404 ▲134.17 ▼0.0791.28 ▼17.8343.91 ▼4.65

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ai-reply/ai-reply.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-reply/ai-reply-js.php:100
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ai-reply/ai-reply-option.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-reply/ai-reply-settings.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: automation, comment, ai, openai, gpt...

ai-reply/ai-reply.php Passed 13 tests

The principal PHP file in "AI Reply" v. 1.0.2 is loaded by WordPress automatically on each request
110 characters long description:
Adds a "Reply with ChatGPT" opion to the wp-admin comment page. call OpenAI API to auto generate text to reply

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected188 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41116188

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin