62% post-saint

Code Review | Post Saint: ChatGPT, GPT4, DALL-E, Stable Diffusion, Pexels, Dezgo AI Text & Image Generator

WordPress plugin Post Saint: ChatGPT, GPT4, DALL-E, Stable Diffusion, Pexels, Dezgo AI Text & Image Generator scored62%from 54 tests.

About plugin

  • Plugin page: post-saint
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2023
  • Latest release: Jun 10, 2023
  • Number of updates: 19
  • Update frequency: every 7.1 days
  • Top authors: postsaint (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,754 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.87ms] Passed 4 tests

Analyzing server-side resources used by Post Saint: ChatGPT, GPT4, DALL-E, Stable Diffusion, Pexels, Dezgo AI Text & Image Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2440.52 ▲3.75
Dashboard /wp-admin3.54 ▲0.2047.45 ▼12.03
Posts /wp-admin/edit.php3.66 ▲0.3050.60 ▲5.31
Add New Post /wp-admin/post-new.php6.17 ▲0.2897.10 ▲1.43
Media Library /wp-admin/upload.php3.47 ▲0.2435.73 ▲3.35
Post Saint /wp-admin/admin.php?page=post-saint/view-log.php3.4530.32
Settings /wp-admin/admin.php?page=post-saint/settings.php3.7544.34
Generate Images /wp-admin/admin.php?page=post-saint/images-new.php3.5637.14
Logs /wp-admin/admin.php?page=post-saint/logs.php3.5445.74
Support /wp-admin/admin.php?page=post-saint/support.php3.4330.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 123 new files
Database: 4 new tables, 8 new options
New tables
wp_postsaint_single_post_text_logs
wp_postsaint_dezgo_image_logs
wp_postsaint_dalle_image_logs
wp_postsaint_stabilityai_image_logs
New WordPress options
widget_recent-comments
postsaint_version
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
postsaint_dezgo_models
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Post Saint: ChatGPT, GPT4, DALL-E, Stable Diffusion, Pexels, Dezgo AI Text & Image Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.27 ▼1.114.90 ▲3.0842.64 ▲5.22
Dashboard /wp-admin2,240 ▲515.81 ▼0.24109.23 ▼11.9640.72 ▼6.31
Posts /wp-admin/edit.php2,126 ▲372.05 ▲0.0637.29 ▼6.4833.05 ▼2.74
Add New Post /wp-admin/post-new.php7,749 ▲6,23026.15 ▲2.85901.37 ▲259.0775.92 ▲17.32
Media Library /wp-admin/upload.php1,422 ▲344.16 ▼0.0596.93 ▼7.7743.87 ▲0.36
Post Saint /wp-admin/admin.php?page=post-saint/view-log.php8102.0226.8928.79
Settings /wp-admin/admin.php?page=post-saint/settings.php2,8052.0636.1638.89
Generate Images /wp-admin/admin.php?page=post-saint/images-new.php1,8911.8929.2032.34
Logs /wp-admin/admin.php?page=post-saint/logs.php9382.0722.7434.42
Support /wp-admin/admin.php?page=post-saint/support.php8232.0522.9925.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_postsaint_dalle_image_logs
    • wp_postsaint_dezgo_image_logs
    • wp_postsaint_single_post_text_logs
    • wp_postsaint_stabilityai_image_logs
  • Zombie WordPress options detected upon uninstall: 8 options
    • postsaint_version
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • postsaint_dezgo_models
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=post-saint/view-log.php
    • > Notice in wp-content/plugins/post-saint/view-log.php+12
    Undefined index: id

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-saint/support.php
  • 65× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/post-saint/post-saint.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schedule' not found in wp-content/plugins/post-saint/lib/action-scheduler/classes/schedules/ActionScheduler_SimpleSchedule.php:6
    • > PHP Notice
      Undefined variable: writing_style in wp-content/plugins/post-saint/inc/functions/prepare_prompt.php on line 20
    • > PHP Fatal error
      Uncaught Error: Interface 'ActionScheduler_Schedule' not found in wp-content/plugins/post-saint/lib/action-scheduler/deprecated/ActionScheduler_Schedule_Deprecated.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_FinishedAction' not found in wp-content/plugins/post-saint/lib/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/post-saint/images-new.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Lock' not found in wp-content/plugins/post-saint/lib/action-scheduler/classes/ActionScheduler_OptionLock.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_RecurringSchedule' not found in wp-content/plugins/post-saint/lib/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Schedule_Deprecated' not found in wp-content/plugins/post-saint/lib/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php:6
    • > PHP Notice
      Undefined variable: writing_style in wp-content/plugins/post-saint/inc/functions/prepare_prompt.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: openai, dalle, ai, stable diffusion, gpt4...

post-saint/post-saint.php 85% from 13 tests

"Post Saint: ChatGPT, GPT4, DALL-E, Stable Diffusion, Pexels, Dezgo AI Text & Image Generator" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 360 characters long)
  • Plugin Name: A shorter plugin name is better (currently 92 characters long instead of max. 70)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin11,638 lines of code in 109 files:
LanguageFilesBlank linesComment linesLines of code
PHP1002,9735,52710,209
JavaScript5296218842
CSS28770497
Markdown237090

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.45
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes77
▷ Abstract classes1519.48%
▷ Concrete classes6280.52%
▷ Final classes00.00%
Methods642
▷ Static methods7912.31%
▷ Public methods48174.92%
▷ Protected methods13621.18%
▷ Private methods253.89%
Functions48
▷ Named functions4083.33%
▷ Anonymous functions816.67%
Constants39
▷ Global constants37.69%
▷ Class constants3692.31%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/close.png0.27KB0.29KB0.00%
images/prev.png1.33KB1.59KB0.00%
images/postsaint-logo.png8.27KB3.55KB▼ 57.06%
images/next.png1.32KB1.58KB0.00%