84% draft-from-google-docs

Code Review | Draft from Google Docs

WordPress plugin Draft from Google Docs scored84%from 54 tests.

About plugin

  • Plugin page: draft-from-google...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: May 1, 2023
  • Number of updates: 23
  • Update frequency: every 14.5 days
  • Top authors: davidfcarr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,358 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.07MB] [CPU: ▼0.07ms] Passed 4 tests

A check of server-side resources used by Draft from Google Docs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.32 ▼4.42
Dashboard /wp-admin3.37 ▲0.0748.74 ▲1.55
Posts /wp-admin/edit.php3.42 ▲0.0747.44 ▲1.65
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.84 ▲5.25
Media Library /wp-admin/upload.php3.30 ▲0.0735.07 ▲0.93
Import Google Doc /wp-admin/edit.php?page=draft_from_google_docs3.2731.16

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Draft from Google Docs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.59 ▼0.961.74 ▲0.0339.12 ▼7.99
Dashboard /wp-admin2,210 ▲214.86 ▼0.10107.16 ▼3.9841.51 ▲1.09
Posts /wp-admin/edit.php2,093 ▲72.16 ▲0.1439.52 ▲2.5335.40 ▲2.67
Add New Post /wp-admin/post-new.php1,536 ▲323.07 ▲0.00578.91 ▼66.2048.39 ▼2.89
Media Library /wp-admin/upload.php1,392 ▲104.26 ▲0.0294.84 ▲0.6641.87 ▲1.08
Import Google Doc /wp-admin/edit.php?page=draft_from_google_docs9954.5678.1846.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/draft-from-google-docs/draft-from-google-docs.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: utility, import, google docs

draft-from-google-docs/draft-from-google-docs.php 92% from 13 tests

The main PHP script in "Draft from Google Docs" version 1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 306 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin310 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13316286
JavaScript12024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin