83% goal-tracker-for-patreon

Code Review | Goal Tracker for Patreon

WordPress plugin Goal Tracker for Patreon scored 83% from 53 tests.

About plugin

  • Plugin page: goal-tracker-for-...
  • Plugin version: 0.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.2
  • WordPress version: 5.8.1
  • First release: Apr 6, 2016
  • Latest release: Jul 5, 2016
  • Number of updates: 50
  • Update frequency: every 1.8 days
  • Top authors: vikingjs (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

40+ active / 1,863 total downloads

Benchmarks

Plugin footprint 82% 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.07MB] [CPU: ▲685.48ms] 50% from 4 tests

This is a short check of server-side resources used by Goal Tracker for Patreon
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,046.70ms on /wp-admin/options-general.php?page=goals_for_patreon_options)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 685.48ms on /wp-admin/options-general.php?page=goals_for_patreon_options)
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.161,211.36 ▲1,189.55
Dashboard /wp-admin3.12 ▲0.061,199.17 ▲1,158.43
Posts /wp-admin/edit.php3.23 ▲0.12940.96 ▲898.99
Add New Post /wp-admin/post-new.php5.48 ▲0.05956.92 ▼188.58
Media Library /wp-admin/upload.php3.06 ▲0.05910.45 ▲873.06
Goal Tracker for Patreon /wp-admin/options-general.php?page=goals_for_patreon_options3.001,046.70

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 2 new options
New WordPress options
widget_goaltrackerforpatreongoalwidget
widget_goaltrackerforpatreonbuttonwidget

Browser metrics Passed 4 tests

An overview of browser requirements for Goal Tracker for Patreon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,834 ▲22816.53 ▲0.6312.39 ▲3.9849.57 ▼2.62
Dashboard /wp-admin2,992 ▲1456.57 ▲0.76138.56 ▲4.06101.23 ▼5.99
Posts /wp-admin/edit.php2,769 ▲632.87 ▲0.2067.93 ▲5.58101.36 ▲10.69
Add New Post /wp-admin/post-new.php2,502 ▲84915.83 ▼2.81373.39 ▲9.26125.53 ▲17.24
Media Library /wp-admin/upload.php1,837 ▲655.13 ▲0.12126.27 ▼37.50102.92 ▼12.86
Goal Tracker for Patreon /wp-admin/options-general.php?page=goals_for_patreon_options2,4152.9394.4773.94

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 2 options
    • widget_goaltrackerforpatreongoalwidget
    • widget_goaltrackerforpatreonbuttonwidget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=goals_for_patreon_options
    • > Notice in wp-content/plugins/goal-tracker-for-patreon/lib/Options.php+318
    Undefined variable: toggleOptionName
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=goals_for_patreon_options
    • > Notice in wp-content/plugins/goal-tracker-for-patreon/lib/Options.php+315
    Undefined variable: name

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

goal-tracker-for-patreon/goal-tracker-for-patreon.php Passed 13 tests

The principal PHP file in "Goal Tracker for Patreon" v. 0.4.6 is loaded by WordPress automatically on each request
95 characters long description:
This plugin connects to your Patreon account and allows you to show progress toward your goals.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin917 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP719423762
JavaScript217383
CSS316072

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.71
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods55
▷ Static methods11.82%
▷ Public methods4887.27%
▷ Protected methods00.00%
▷ Private methods712.73%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants00.00%
▷ Class constants27100.00%
▷ Public constants27100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin