89% wordmagic-content-writer

Code Review | WordMagic AI - ChatGPT GPT-3 AI content writer

WordPress plugin WordMagic AI - ChatGPT GPT-3 AI content writer scored89%from 54 tests.

About plugin

  • Plugin page: wordmagic-content...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Jan 23, 2023
  • Number of updates: 12
  • Update frequency: every 1.3 days
  • Top authors: gowebsmarty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼0.65ms] Passed 4 tests

Server-side resources used by WordMagic AI - ChatGPT GPT-3 AI content writer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.98 ▲1.64
Dashboard /wp-admin3.40 ▲0.1045.84 ▼4.92
Posts /wp-admin/edit.php3.51 ▲0.1650.03 ▲0.14
Add New Post /wp-admin/post-new.php5.98 ▲0.1099.64 ▲0.55
Media Library /wp-admin/upload.php3.32 ▲0.0937.05 ▲2.01

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WordMagic AI - ChatGPT GPT-3 AI content writer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲6014.40 ▼0.021.80 ▼0.3845.22 ▲1.25
Dashboard /wp-admin2,223 ▲355.86 ▲0.05101.58 ▼18.7178.46 ▲33.53
Posts /wp-admin/edit.php2,106 ▲171.97 ▼0.0839.55 ▲4.2936.16 ▼2.90
Add New Post /wp-admin/post-new.php1,555 ▲2223.65 ▲0.32719.48 ▲16.9151.07 ▼1.66
Media Library /wp-admin/upload.php1,402 ▲204.20 ▼0.1198.79 ▼2.9763.61 ▲18.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: openai, image generator, content generator, content writer, ai...

wordmagic-content-writer/wordmagic-ai.php 77% from 13 tests

"WordMagic AI - ChatGPT GPT-3 AI content writer" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordmagic-content-writer.php" instead of "wordmagic-ai.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
Success! There were no dangerous files found in this plugin679 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14144191571
CSS316078
Sass14029
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods35
▷ Static methods411.43%
▷ Public methods3291.43%
▷ Protected methods00.00%
▷ Private methods38.57%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants7
▷ Global constants7100.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
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/dash-logo-white.png36.34KB16.74KB▼ 53.92%
admin/assets/icon-xs.png2.24KB0.86KB▼ 61.46%
admin/assets/icon-guten.png1.19KB1.37KB0.00%