74% gumpress

Code Review | Gumpress

WordPress plugin Gumpress scored74%from 54 tests.

About plugin

  • Plugin page: gumpress
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2022
  • Latest release: Jan 6, 2023
  • Number of updates: 10
  • Update frequency: every 35.1 days
  • Top authors: uilib (90%)mh_rafi (20%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,142 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.79ms] Passed 4 tests

An overview of server-side resources used by Gumpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.28 ▼6.50
Dashboard /wp-admin3.42 ▲0.0848.14 ▼16.10
Posts /wp-admin/edit.php3.54 ▲0.1851.45 ▲1.74
Add New Post /wp-admin/post-new.php6.00 ▲0.1298.30 ▼6.30
Media Library /wp-admin/upload.php3.35 ▲0.1239.12 ▲6.30

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_gumroad_product_relationships
New WordPress options
uilib_gumpress_version
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
uilib_gumpress_installed
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Gumpress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,155 ▲40914.88 ▲0.5122.45 ▲20.7244.11 ▲2.57
Dashboard /wp-admin2,244 ▲645.58 ▼0.1088.63 ▼2.9188.65 ▲37.00
Posts /wp-admin/edit.php2,149 ▲462.01 ▼0.0340.11 ▼1.4535.63 ▼0.88
Add New Post /wp-admin/post-new.php1,579 ▲3422.70 ▼0.48702.63 ▲37.2250.96 ▼0.03
Media Library /wp-admin/upload.php1,443 ▲404.22 ▼0.14104.81 ▲3.7874.19 ▲29.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_gumroad_product_relationships
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • uilib_gumpress_installed
    • widget_recent-posts
    • widget_theysaidso_widget
    • uilib_gumpress_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gumpress/includes/Admin/views/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: gumroad store, gumroad checkout, woocommerce, gumroad

gumpress/gumpress.php 92% from 13 tests

"Gumpress" version 1.2.1'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: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected1,248 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP213025661,138
Markdown112045
JavaScript12021
JSON20020
SVG10019
CSS1025

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.23
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods75
▷ Static methods1925.33%
▷ Public methods7296.00%
▷ Protected methods00.00%
▷ Private methods34.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin