84% ai-generated-post

Code Review | AI Generated Post

WordPress plugin AI Generated Post scored 84% from 54 tests.

About plugin

  • Plugin page: ai-generated-post
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2023
  • Latest release: Jun 9, 2023
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: marufnahid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 166 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.02ms] Passed 4 tests

An overview of server-side resources used by AI Generated Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.59 ▲0.86
Dashboard /wp-admin3.32 ▲0.0248.07 ▼0.20
Posts /wp-admin/edit.php3.37 ▲0.0246.58 ▲3.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.07 ▼20.19
Media Library /wp-admin/upload.php3.25 ▲0.0239.43 ▲5.73
Generate Post /wp-admin/admin.php?page=aignpost-generate3.2533.40
Settings /wp-admin/admin.php?page=aignpost-settings3.2132.84
AIGN Post /wp-admin/admin.php?page=aignpost-dashboard3.2131.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

AI Generated Post: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲11714.45 ▲0.081.95 ▲0.3644.83 ▼5.66
Dashboard /wp-admin2,230 ▲425.86 ▲0.8698.30 ▼8.9938.05 ▼2.40
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0434.47 ▲0.2532.26 ▼1.47
Add New Post /wp-admin/post-new.php1,536 ▲2217.52 ▲0.02668.59 ▲53.9356.25 ▲14.02
Media Library /wp-admin/upload.php1,415 ▲304.21 ▲0.0293.87 ▼11.2941.88 ▼5.38
Generate Post /wp-admin/admin.php?page=aignpost-generate1,7425.64116.35129.61
Settings /wp-admin/admin.php?page=aignpost-settings8292.0624.6032.56
AIGN Post /wp-admin/admin.php?page=aignpost-dashboard8572.0322.2933.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Orhanerday\\OpenAi\\OpenAi' not found in wp-content/plugins/ai-generated-post/vendor/orhanerday/open-ai/tests/OpenAiTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Finder' not found in wp-content/plugins/ai-generated-post/vendor/orhanerday/open-ai/.php-cs-fixer.dist.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Settings Page), #2 (Generate Page)
Please take inspiration from this readme.txt

ai-generated-post/ai-generated-post.php Passed 13 tests

"AI Generated Post" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
132 characters long description:
This is a plugin for WordPress for creating post, writing content for your blog post, social post, buddypress post , forum post etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,226 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP183646301,698
Markdown53380754
CSS1981416
YAML9252189
JSON400125
XML10039
JavaScript1304
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity16.86
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods101
▷ Static methods3635.64%
▷ Public methods9695.05%
▷ Protected methods00.00%
▷ Private methods54.95%
Functions37
▷ Named functions821.62%
▷ Anonymous functions2978.38%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected