79% golf-handicap-calculator

Code Review | Golf Handicap Calculator

WordPress plugin Golf Handicap Calculator scored79%from 54 tests.

About plugin

  • Plugin page: golf-handicap-cal...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.0
  • WordPress version: 6.3.1
  • First release: Sep 22, 2014
  • Latest release: Dec 2, 2014
  • Number of updates: 11
  • Update frequency: every 11.9 days
  • Top authors: fozzyluke123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.81ms] Passed 4 tests

An overview of server-side resources used by Golf Handicap Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.84 ▼2.49
Dashboard /wp-admin3.35 ▲0.0551.31 ▼1.51
Posts /wp-admin/edit.php3.40 ▲0.0456.09 ▲2.18
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.02 ▼0.27
Media Library /wp-admin/upload.php3.27 ▲0.0439.98 ▲1.04
GHC Settings /wp-admin/options-general.php?page=golf-handicap-calculator/admin-page.php3.2433.82

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: 1 new table, 7 new options
New tables
wp_ghc_data
New WordPress options
widget_theysaidso_widget
ghc_db_version
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Golf Handicap Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲4414.28 ▼0.292.38 ▲0.4939.57 ▼6.70
Dashboard /wp-admin2,199 ▲225.65 ▲0.0892.86 ▲2.3736.99 ▼4.45
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0338.62 ▼3.6135.28 ▲1.74
Add New Post /wp-admin/post-new.php1,536 ▲1022.44 ▼0.50668.98 ▼22.6652.15 ▲1.78
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.00109.65 ▲7.1347.52 ▲3.18
GHC Settings /wp-admin/options-general.php?page=golf-handicap-calculator/admin-page.php8232.1124.4626.15

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/golf-handicap-calculator/ghc_form.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: cardcalc in wp-content/plugins/golf-handicap-calculator/ghc_form.php on line 55
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/golf-handicap-calculator/ghc_form.php on line 55
    • > PHP Notice
      Undefined variable: cardcalc in wp-content/plugins/golf-handicap-calculator/ghc_form.php on line 2
    • > PHP Notice
      Undefined variable: cardcalc in wp-content/plugins/golf-handicap-calculator/ghc_form.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/golf-handicap-calculator/admin-page.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/golf-handicap-calculator/ghc_form.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/golf-handicap-calculator/ghc_form.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/golf-handicap-calculator/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/golf-handicap-calculator/admin-page.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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: golf, score, congu, handicap, calculator...

golf-handicap-calculator/golf-handicap-calculator.php Passed 13 tests

The principal PHP file in "Golf Handicap Calculator" v. 1.0.3 is loaded by WordPress automatically on each request
43 characters long description:
A Plugin that calculates your golf handicap

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin540 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP4927345
JavaScript146191
CSS1004

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.35
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin