89% gumroad

Code Review | Gumroad

WordPress plugin Gumroad scored89%from 54 tests.

About plugin

  • Plugin page: gumroad
  • Plugin version: 3.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Oct 11, 2023
  • Number of updates: 65
  • Update frequency: every 57.9 days
  • Top authors: pderksen (75.38%)sahillavingia (16.92%)kowfm (9.23%)Otto42 (3.08%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /27,972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Gumroad
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.60 ▼6.73
Dashboard /wp-admin3.35 ▲0.0546.59 ▼3.14
Posts /wp-admin/edit.php3.46 ▲0.1153.63 ▼0.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.84 ▼14.85
Media Library /wp-admin/upload.php3.27 ▲0.0438.05 ▲0.86
Gumroad /wp-admin/options-general.php?page=gumroad3.2533.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Gumroad
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5714.28 ▼0.251.58 ▼0.0439.83 ▼0.40
Dashboard /wp-admin2,199 ▲225.62 ▲0.0485.34 ▼1.3335.91 ▼8.62
Posts /wp-admin/edit.php2,101 ▲12.03 ▲0.0035.56 ▲1.3335.80 ▼1.05
Add New Post /wp-admin/post-new.php6,201 ▲4,67519.24 ▼4.39931.73 ▲253.8870.98 ▲16.43
Media Library /wp-admin/upload.php1,404 ▲74.10 ▼0.09113.25 ▲12.9246.78 ▲4.13
Gumroad /wp-admin/options-general.php?page=gumroad1,1092.0026.9736.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
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
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: embed, gumroad overlay, ecommerce, gumroad, javascript...

gumroad/gumroad.php 85% from 13 tests

"Gumroad" version 3.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected583 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP7117240319
JavaScript32550216
JSON20017
Sass21016
CSS301115

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
8 PNG files occupy 0.68MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png45.75KB15.63KB▼ 65.84%
assets/screenshot-2.png155.76KB57.88KB▼ 62.84%
assets/icon-128x128.png10.16KB2.78KB▼ 72.69%
assets/images/gumroad-wp-003.png50.76KB13.14KB▼ 74.11%
assets/images/gumroad-wp-007.png106.61KB23.94KB▼ 77.55%