84% writers-block-block

Code Review | Coauthor - AI Writing Assistant and Artist

WordPress plugin Coauthor - AI Writing Assistant and Artist scored84%from 54 tests.

About plugin

  • Plugin page: writers-block-block
  • Plugin version: 0.3.5
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2020
  • Latest release: Dec 9, 2022
  • Number of updates: 6
  • Update frequency: every 118.3 days
  • Top authors: artpi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.07ms] Passed 4 tests

An overview of server-side resources used by Coauthor - AI Writing Assistant and Artist
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.38 ▼6.40
Dashboard /wp-admin3.36 ▲0.0245.27 ▼10.12
Posts /wp-admin/edit.php3.47 ▲0.1249.05 ▲4.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0690.80 ▼4.39
Media Library /wp-admin/upload.php3.28 ▲0.0638.57 ▲4.67
Coauthor /wp-admin/options-general.php?page=coauthor3.2530.20

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Coauthor - AI Writing Assistant and Artist
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.72 ▼0.661.82 ▲0.1339.52 ▼3.87
Dashboard /wp-admin2,207 ▲195.81 ▲0.9098.41 ▼6.3537.86 ▼3.88
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0339.23 ▲3.9334.52 ▲1.90
Add New Post /wp-admin/post-new.php6,357 ▲4,83827.75 ▲4.72899.34 ▲222.6755.05 ▲6.91
Media Library /wp-admin/upload.php1,392 ▲104.17 ▲0.01105.16 ▲8.8446.68 ▲5.00
Coauthor /wp-admin/options-general.php?page=coauthor7812.0724.5428.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/writers-block-block/coauthor.php:69
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/writers-block-block/class.openai-rest-controller.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: ai, gpt3, openai, dalle, block

writers-block-block/coauthor.php 85% from 13 tests

The main PHP script in "Coauthor - AI Writing Assistant and Artist" version 0.3.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("writers-block-block.php" instead of "coauthor.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin270 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP43727267
CSS2002
JavaScript1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods213.33%
▷ Private methods16.67%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin