84% ghostwriter-by-openai

Code Review | GhostWriter by OpenAI

WordPress plugin GhostWriter by OpenAI scored84%from 54 tests.

About plugin

  • Plugin page: ghostwriter-by-op...
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 13, 2023
  • Latest release: Apr 13, 2023
  • Number of updates: 4
  • Update frequency: every 7.2 days
  • Top authors: tsunaguinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /102 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.13ms] Passed 4 tests

An overview of server-side resources used by GhostWriter by OpenAI
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.78 ▲4.68
Dashboard /wp-admin3.32 ▼0.0353.12 ▼14.07
Posts /wp-admin/edit.php3.37 ▲0.0147.64 ▼3.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.59 ▼19.29
Media Library /wp-admin/upload.php3.24 ▲0.0133.26 ▼4.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for GhostWriter by OpenAI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.38 ▼0.211.68 ▼0.5143.77 ▼10.00
Dashboard /wp-admin2,216 ▲365.64 ▼0.0293.78 ▲2.6142.08 ▲0.84
Posts /wp-admin/edit.php2,124 ▲211.97 ▲0.0238.47 ▲3.4933.28 ▼1.59
Add New Post /wp-admin/post-new.php1,544 ▲1523.31 ▲0.23670.14 ▲81.0353.22 ▲0.49
Media Library /wp-admin/upload.php1,421 ▲244.16 ▼0.01115.82 ▲10.8749.12 ▲5.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ghostwriter-by-openai/main.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: openai

ghostwriter-by-openai/main.php 92% from 13 tests

The main PHP script in "GhostWriter by OpenAI" version 0.1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ghostwriter-by-openai.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin251 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP74622221
JavaScript13030

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected