89% phantom-writer

Code Review | Phantom Writer - AI Content Writer

WordPress plugin Phantom Writer - AI Content Writer scored89%from 54 tests.

About plugin

  • Plugin page: phantom-writer
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 18
  • Update frequency: every 4.0 days
  • Top authors: widgilabs (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /322 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Phantom Writer - AI Content Writer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.74 ▲0.12
Dashboard /wp-admin3.31 ▲0.0044.61 ▼4.74
Posts /wp-admin/edit.php3.36 ▲0.0045.57 ▼5.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.14 ▼8.37
Media Library /wp-admin/upload.php3.23 ▲0.0033.24 ▲2.03

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Phantom Writer - AI Content Writer: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.22 ▼0.141.71 ▲0.0639.72 ▲1.34
Dashboard /wp-admin2,195 ▲155.64 ▲0.0193.33 ▼3.2542.12 ▼3.80
Posts /wp-admin/edit.php2,100 ▼01.96 ▲0.0139.72 ▼1.6037.93 ▼1.02
Add New Post /wp-admin/post-new.php1,526 ▼022.92 ▼0.21668.66 ▲32.2965.51 ▲9.85
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0496.92 ▼0.0542.91 ▲3.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: seo, chatgpt, automated post, ai

phantom-writer/phantomwriter.php 85% from 13 tests

The primary PHP file in "Phantom Writer - AI Content Writer" version 2.2.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("phantom-writer.php" instead of "phantomwriter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected123 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33481123

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin