10% aipress

Code Review | AIPress - OpenAI, ChatGPT Content Creator, Image Generator

WordPress plugin AIPress - OpenAI, ChatGPT Content Creator, Image Generator scored10%from 54 tests.

About plugin

  • Plugin page: aipress
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2023
  • Latest release: Feb 24, 2023
  • Number of updates: 24
  • Update frequency: every 3.0 days
  • Top authors: kyazici (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /3,255 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/aipress/source/helpers/scripts.php+7
    Undefined index: page

Server metrics [RAM: ▼1.97MB] [CPU: ▼56.64ms] Passed 4 tests

Analyzing server-side resources used by AIPress - OpenAI, ChatGPT Content Creator, Image Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.52 ▼35.62
Dashboard /wp-admin2.05 ▼1.306.23 ▼54.37
Posts /wp-admin/edit.php2.05 ▼1.315.85 ▼39.96
Add New Post /wp-admin/post-new.php2.05 ▼3.846.79 ▼96.60
Media Library /wp-admin/upload.php2.05 ▼1.185.86 ▼26.75

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for AIPress - OpenAI, ChatGPT Content Creator, Image Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11815.11 ▲0.541.89 ▲0.0244.43 ▲0.94
Dashboard /wp-admin2,253 ▲686.62 ▲0.72114.50 ▲9.3681.13 ▲41.04
Posts /wp-admin/edit.php2,304 ▲2153.25 ▲1.2547.02 ▲9.4633.81 ▼3.47
Add New Post /wp-admin/post-new.php1,725 ▲19124.47 ▲1.34770.06 ▲105.0237.82 ▼12.73
Media Library /wp-admin/upload.php1,600 ▲2125.04 ▲0.78108.33 ▼3.4469.52 ▲21.80
Post Creator /wp-admin/admin.php?page=aipress#/postcreator1,47212.91701.7265.21
Image Generator /wp-admin/admin.php?page=aipress#/imagegenerator1,59110.29709.2453.19
Dashboard /wp-admin/admin.php?page=aipress#/dashboard1,7828.64226.8849.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/aipress/source/helpers/scripts.php+7
    Undefined index: page
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include(AIPRESS_ROOTsource/helpers/apis/settings.php): failed to open stream: No such file or directory in wp-content/plugins/aipress/source/helpers/apis.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/aipress/source/helpers/apis/general.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_AiPress_General_Functions' not found in wp-content/plugins/aipress/source/helpers/apis/settings.php:2
    • > PHP Warning
      Use of undefined constant AIPRESS_ROOT - assumed 'AIPRESS_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/aipress/source/helpers/apis.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aipress/source/helpers/scripts.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_AiPress_Settings_Rest_Route' not found in wp-content/plugins/aipress/source/helpers/apis.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aipress/source/helpers/styles.php:7
    • > PHP Warning
      include(AIPRESS_ROOTsource/helpers/apis/images.php): failed to open stream: No such file or directory in wp-content/plugins/aipress/source/helpers/apis.php on line 5
    • > PHP Warning
      Use of undefined constant AIPRESS_ROOT - assumed 'AIPRESS_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/aipress/source/helpers/apis.php on line 5
    • > PHP Warning
      include(): Failed opening 'AIPRESS_ROOTsource/helpers/apis/images.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/aipress/source/helpers/apis.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=aipress#/postcreator
    • > Console-api (warning) in wp-content/plugins/aipress/source/cpanel/cpanel.js?ver=1.2.2+1:605376
    widget-toolbar-no-items" Object "\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-widget-toolbar-no-items

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #4, #5 in aipress/assets to your readme.txt
The official readme.txt might help

aipress/aipress.php Passed 13 tests

This is the main PHP file of "AIPress - OpenAI, ChatGPT Content Creator, Image Generator" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
115 characters long description:
This is a plugin that uses OpenAI's GPT-3 and chatGPT models to generate AI-powered content on your WordPress site.

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
There were no executable files found in this plugin1,837 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS14103521,285
PHP1010336550
JavaScript2012

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.20
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3597.22%
▷ Protected methods00.00%
▷ Private methods12.78%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants6
▷ Global constants6100.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
8 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
source/assets/bg.png7.02KB2.78KB▼ 60.41%
source/cpanel/assets/header.png51.01KB23.04KB▼ 54.84%
source/cpanel/assets/logo-alone.png2.37KB1.75KB▼ 26.03%
source/assets/bg2.png6.88KB2.71KB▼ 60.67%
source/gutenberg/sidebar/build/images/emptry.a7c542ab.png5.02KB1.52KB▼ 69.72%