83% writesonic

Code Review | Writesonic

WordPress plugin Writesonic scored83%from 54 tests.

About plugin

  • Plugin page: writesonic
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.2
  • WordPress version: 6.3.1
  • First release: May 21, 2022
  • Latest release: Oct 18, 2023
  • Number of updates: 5
  • Update frequency: every 103.0 days
  • Top authors: writesonic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /9,861 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.70ms] Passed 4 tests

This is a short check of server-side resources used by Writesonic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.08 ▼2.02
Dashboard /wp-admin3.37 ▲0.0248.70 ▼10.33
Posts /wp-admin/edit.php3.48 ▲0.1244.44 ▼4.39
Add New Post /wp-admin/post-new.php6.49 ▲0.6090.18 ▲1.96
Media Library /wp-admin/upload.php3.29 ▲0.0634.91 ▲2.39
Writesonic /wp-admin/options-general.php?page=writesonic3.2731.10

Server storage [IO: ▲1.41MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • You have illegally modified 3 files (0.00KB) outside of "wp-content/plugins/writesonic/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/writesonic/assets/banner-772\303\227250.jpg"
    • (new file) "wp-content/plugins/writesonic/assets/icon-128\303\227128.png"
    • (new file) "wp-content/plugins/writesonic/assets/banner-1544\303\227500.jpg"
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
writesonic_api_key
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Writesonic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.101.68 ▲0.0639.30 ▼0.61
Dashboard /wp-admin2,199 ▲195.54 ▼0.1080.38 ▼13.5340.22 ▼0.11
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0934.87 ▼4.8036.39 ▲0.30
Add New Post /wp-admin/post-new.php1,530 ▲223.19 ▲0.25641.92 ▲15.9553.99 ▲0.44
Media Library /wp-admin/upload.php1,404 ▲74.25 ▼0.0096.82 ▲3.2642.15 ▼1.80
Writesonic /wp-admin/options-general.php?page=writesonic8071.9927.0023.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • writesonic_api_key

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/writesonic/templates/settings.php:7

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: A description for screenshot #3 is required in writesonic/assets to your readme.txt
You can take inspiration from this readme.txt

writesonic/writesonic.php Passed 13 tests

The primary PHP file in "Writesonic" version 1.0.2 is used by WordPress to initiate all plugin functionality
27 characters long description:
Writesonic WordPress plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,984 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
SVG1003,658
PHP283174323
Markdown1103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods2996.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.13MB with 0.63MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png84.34KB43.29KB▼ 48.67%
assets/screenshot-2.png349.66KB136.04KB▼ 61.10%
assets/screenshot-1.png58.75KB18.86KB▼ 67.89%
assets/icon-128×128.png2.30KB1.50KB▼ 34.76%
assets/screenshot-3.png569.54KB195.11KB▼ 65.74%