64% ai-robot

Code Review | Ai Robot

WordPress plugin Ai Robot scored64%from 54 tests.

About plugin

  • Plugin page: ai-robot
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 2, 2023
  • Latest release: May 12, 2023
  • Number of updates: 10
  • Update frequency: every 1.0 days
  • Top authors: airobot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /270 total downloads


Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.71MB] [CPU: ▼5.31ms] Passed 4 tests

Server-side resources used by Ai Robot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7741.38 ▲0.73
Dashboard /wp-admin4.05 ▲0.7053.61 ▼10.39
Posts /wp-admin/edit.php4.08 ▲0.7253.82 ▲4.40
Add New Post /wp-admin/post-new.php6.56 ▲0.6896.22 ▼15.96
Media Library /wp-admin/upload.php3.97 ▲0.7444.14 ▲7.38
Freemius Debug [v.2.5.7] /wp-admin/admin.php?page=freemius4.3040.35

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,638 new files
Database: 1 new table, 11 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Ai Robot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.24 ▼1.054.95 ▲3.2035.94 ▼4.80
Dashboard /wp-admin2,243 ▲554.84 ▼0.20102.09 ▼10.0141.47 ▼1.39
Posts /wp-admin/edit.php2,126 ▲402.00 ▲0.0241.24 ▲2.3638.51 ▼1.50
Add New Post /wp-admin/post-new.php1,540 ▲1023.57 ▲0.48632.92 ▼51.9065.80 ▲11.59
Media Library /wp-admin/upload.php1,425 ▲404.26 ▲0.1595.21 ▼21.2343.68 ▼4.25
Freemius Debug [v.2.5.7] /wp-admin/admin.php?page=freemius1,0841.8529.6431.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/ai-robot/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 1 table
    • wp_ai_robot_logs
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-posts
    • theysaidso_admin_options
    • fs_active_plugins
    • ai_robot_version_pro
    • ai_robot_global_settings
    • fs_debug_mode
    • can_compress_scripts
    • fs_accounts
    • widget_recent-comments
    • widget_theysaidso_widget
    • ...

Smoke tests 75% 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 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
  • 748× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ai-robot/vendor/google/gax/tests/Tests/Unit/FixedSizeCollectionTest.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ai-robot/vendor/google/gax/tests/Tests/Unit/ApiStatusTest.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/ai-robot/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php:24
    • > PHP Fatal error
      Trait 'Google\\Cloud\\Core\\UriTrait' not found in wp-content/plugins/ai-robot/vendor/google/cloud-core/src/Upload/AbstractUploader.php on line 28
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Cache\\CacheItemPoolInterface' not found in wp-content/plugins/ai-robot/vendor/google/auth/src/Cache/SysVCacheItemPool.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/ai-robot/vendor/google/gax/src/Testing/GeneratedTest.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/ai-robot/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/ai-robot/vendor/google/protobuf/src/Google/Protobuf/Value.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/ai-robot/vendor/google/common-protos/src/Api/Expr/V1alpha1/Expr.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/ai-robot/vendor/google/common-protos/src/Cloud/ServiceManagement/V1/Diagnostic.php:16

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)
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: gpt-3, ai, openai, gpt, chatgpt

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

The main PHP file in "Ai Robot" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
36 characters long description:
OpenAI and ChatGPT Content Generator

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin125,557 lines of code in 1,537 files:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell4255688
Protocol Buffers2143864

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.26
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
▷ Abstract classes242.09%
▷ Concrete classes1,12597.91%
▷ Final classes262.31%
▷ Static methods84310.33%
▷ Public methods6,98685.62%
▷ Protected methods2823.46%
▷ Private methods89110.92%
▷ Named functions22350.45%
▷ Anonymous functions21949.55%
▷ Global constants12616.49%
▷ Class constants63883.51%
▷ Public constants61896.87%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.51MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/vimeo.png27.81KB12.03KB▼ 56.74%
assets/images/open-ai.png2.83KB2.45KB▼ 13.49%
freemius/assets/img/ai-robot.png9.16KB5.26KB▼ 42.58%
assets/images/bottom-dashed.png1.72KB0.19KB▼ 88.70%
assets/images/campaigns-list.png65.39KB18.82KB▼ 71.22%