77% ai-co-pilot-for-wp

Code Review | WP AI CoPilot - AI content writer plugin, ChatGPT WordPress, GPT-3/4 , Ai assistance

WordPress plugin WP AI CoPilot - AI content writer plugin, ChatGPT WordPress, GPT-3/4 , Ai assistance scored77%from 54 tests.

About plugin

  • Plugin page: ai-co-pilot-for-wp
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 3, 2023
  • Latest release: Nov 11, 2023
  • Number of updates: 33
  • Update frequency: every 5.8 days
  • Top authors: boomdevs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /4,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.07MB] [CPU: ▲17.12ms] Passed 4 tests

An overview of server-side resources used by WP AI CoPilot - AI content writer plugin, ChatGPT WordPress, GPT-3/4 , Ai assistance
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.52 ▲2.0554.34 ▲14.33
Dashboard /wp-admin5.41 ▲2.1059.15 ▲9.99
Posts /wp-admin/edit.php5.46 ▲2.1064.13 ▲17.77
Add New Post /wp-admin/post-new.php9.49 ▲3.60868.23 ▲777.92
Media Library /wp-admin/upload.php5.27 ▲2.0459.48 ▲26.40

Server storage [IO: ▲3.49MB] [DB: ▲0.10MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 376 new files
Database: no new tables, 8 new options
New WordPress options
wp-ai-copilot
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
wp_ai_pilot_models
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP AI CoPilot - AI content writer plugin, ChatGPT WordPress, GPT-3/4 , Ai assistance
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲17213.79 ▼0.568.81 ▲6.8538.67 ▼6.15
Dashboard /wp-admin2,250 ▲805.58 ▼0.0496.48 ▼15.4643.87 ▲0.09
Posts /wp-admin/edit.php2,155 ▲552.00 ▲0.0541.37 ▲4.3234.62 ▼2.49
Add New Post /wp-admin/post-new.php1,659 ▲13323.58 ▲0.58667.46 ▲48.0739.76 ▼13.35
Media Library /wp-admin/upload.php1,455 ▲584.18 ▲0.00110.01 ▲5.1046.74 ▲3.56
Settings /wp-admin/admin.php?page=aich-settings#tab=settings9,17514.37370.3990.97
Free Vs Pro /wp-admin/admin.php?page=aich-settings#tab=free-vs-pro8,91211.74347.74172.96
AI Content Generator /wp-admin/admin.php?page=aich-settings#tab=ai-content-generator8,87411.80378.4591.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • wp_ai_pilot_models
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • wp-ai-copilot
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ai-co-pilot-for-wp/public/partials/ai-content-helper-public-display.php
    • > /wp-content/plugins/ai-co-pilot-for-wp/admin/partials/ai-content-helper-admin-display.php
  • 54× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestFactoryInterface' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/psr7/src/HttpFactory.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/psr7/src/FnStream.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/psr7/src/AppendStream.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-co-pilot-for-wp/includes/class-aich-load-block-assets.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/psr7/src/Response.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/ai-co-pilot-for-wp/vendor/guzzlehttp/promises/src/Promise.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% 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-co-pilot-for-wp/wp-ai-co-pilot.php 77% from 13 tests

The main PHP script in "WP AI CoPilot - AI content writer plugin, ChatGPT WordPress, GPT-3/4 , Ai assistance" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ai-co-pilot-for-wp.php" instead of "wp-ai-co-pilot.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 84 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin60,774 lines of code in 329 files:
LanguageFilesBlank linesComment linesLines of code
PHP2316,0568,47229,077
JavaScript121,4756687,970
PO File203,1983,5916,500
CSS84485465,735
Sass1697035,674
Markdown181,44704,170
JSON11001,148
XML10611466
YAML16032
SVG2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity17.30
▷ Minimum class complexity1.00
▷ Maximum class complexity151.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces12
Interfaces26
Traits3
Classes158
▷ Abstract classes21.27%
▷ Concrete classes15698.73%
▷ Final classes3522.44%
Methods1,127
▷ Static methods19417.21%
▷ Public methods96985.98%
▷ Protected methods110.98%
▷ Private methods14713.04%
Functions158
▷ Named functions6339.87%
▷ Anonymous functions9560.13%
Constants70
▷ Global constants710.00%
▷ Class constants6390.00%
▷ Public constants5282.54%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.15MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo.png0.71KB0.67KB▼ 5.75%
admin/images/default-icon.png0.66KB0.42KB▼ 36.04%
admin/images/money-back-logo-3.png6.63KB4.21KB▼ 36.47%
admin/images/global_settings.png18.86KB7.89KB▼ 58.14%
libs/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%