84% gumroad-shortcode

Code Review | Gumroad Shortcode

WordPress plugin Gumroad Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: gumroad-shortcode
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 23, 2013
  • Latest release: Oct 23, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: zachs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,007 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.01MB] [CPU: ▼12.63ms] Passed 4 tests

This is a short check of server-side resources used by Gumroad Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.51 ▼3.46
Dashboard /wp-admin3.31 ▼0.0451.79 ▼22.31
Posts /wp-admin/edit.php3.36 ▲0.0048.68 ▼7.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.49 ▼15.17
Media Library /wp-admin/upload.php3.23 ▲0.0038.47 ▼6.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Gumroad Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,092 ▲33114.82 ▲0.4722.86 ▲21.1146.47 ▲3.90
Dashboard /wp-admin2,198 ▲185.58 ▼0.1693.12 ▲0.5038.95 ▼0.24
Posts /wp-admin/edit.php2,097 ▼01.98 ▲0.0235.88 ▼1.9633.84 ▼3.66
Add New Post /wp-admin/post-new.php1,527 ▼123.41 ▲0.35622.74 ▼67.3949.90 ▼4.66
Media Library /wp-admin/upload.php1,397 ▼34.22 ▲0.06105.87 ▼9.0046.53 ▼1.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gumroad-shortcode/plugin.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: api, gumroad

gumroad-shortcode/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Gumroad Shortcode" version 1.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("gumroad-shortcode.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14913

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin