89% google-docs-shortcode

Code Review | Google Docs Shortcode

WordPress plugin Google Docs Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: google-docs-short...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Oct 1, 2015
  • Number of updates: 9
  • Update frequency: every 121.7 days
  • Top authors: r-a-y (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /16,317 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼9.14ms] Passed 4 tests

A check of server-side resources used by Google Docs Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.91 ▲0.96
Dashboard /wp-admin3.33 ▼0.0149.13 ▼16.39
Posts /wp-admin/edit.php3.38 ▲0.0350.04 ▲0.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.75 ▼20.43
Media Library /wp-admin/upload.php3.26 ▲0.0332.53 ▼0.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Docs Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.28 ▼0.071.64 ▼0.1442.45 ▼1.95
Dashboard /wp-admin2,198 ▲275.62 ▲0.0184.46 ▼14.6138.54 ▼8.39
Posts /wp-admin/edit.php2,097 ▼31.97 ▲0.0138.75 ▲0.3135.75 ▲1.93
Add New Post /wp-admin/post-new.php1,537 ▲1118.22 ▼5.45631.77 ▲5.0668.60 ▲15.26
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0092.64 ▼3.3843.90 ▲0.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tested up to: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

google-docs-shortcode/gdocs-shortcode.php 92% from 13 tests

The primary PHP file in "Google Docs Shortcode" version 0.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("google-docs-shortcode.php" instead of "gdocs-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin203 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15888155
Markdown131048

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.58
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin