84% ai-english-teacher

Code Review | AI English Teacher

WordPress plugin AI English Teacher scored84%from 54 tests.

About plugin

  • Plugin page: ai-english-teacher
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2023
  • Latest release: Mar 4, 2023
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: wdraihan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by AI English Teacher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.88 ▲1.93
Dashboard /wp-admin3.32 ▲0.0251.87 ▲3.01
Posts /wp-admin/edit.php3.37 ▲0.0247.77 ▼6.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.16 ▼22.07
Media Library /wp-admin/upload.php3.24 ▲0.0135.95 ▼0.89

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for AI English Teacher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.72 ▲0.351.77 ▼0.1845.27 ▲2.34
Dashboard /wp-admin2,210 ▲305.64 ▲0.0986.30 ▼3.0743.80 ▼2.50
Posts /wp-admin/edit.php2,112 ▲91.96 ▼0.0735.91 ▼5.5133.40 ▼10.05
Add New Post /wp-admin/post-new.php1,538 ▲1023.22 ▲2.25670.74 ▲40.5256.76 ▼4.38
Media Library /wp-admin/upload.php1,412 ▲94.26 ▲0.0898.07 ▼1.4542.74 ▼1.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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 everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ai-english-teacher/temp/form.php:4

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)
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
8 plugin tags: chatgpt, correct grammar, grammarly, openai api, ai grammar checker...

ai-english-teacher/ai-english-teacher.php Passed 13 tests

This is the main PHP file of "AI English Teacher" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
90 characters long description:
This plugin uses OpenAI to correct English grammar and rephrase sentences on your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin351 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32831171
JavaScript211091
CSS19088
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin