78% tiny-yardage-calculator

Code Review | Tiny Yardage Calculator

WordPress plugin Tiny Yardage Calculator scored78%from 54 tests.

About plugin

  • Plugin page: tiny-yardage-calc...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Nov 7, 2023
  • Number of updates: 27
  • Update frequency: every 98.0 days
  • Top authors: ensignrolaren (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /2,939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.84ms] Passed 4 tests

Server-side resources used by Tiny Yardage Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.27 ▲5.20
Dashboard /wp-admin3.31 ▲0.0147.00 ▼2.07
Posts /wp-admin/edit.php3.36 ▲0.0145.24 ▼2.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.82 ▲2.98
Media Library /wp-admin/upload.php3.24 ▲0.0131.63 ▼5.32

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Tiny Yardage Calculator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.26 ▼0.032.02 ▲0.2842.84 ▼2.85
Dashboard /wp-admin2,192 ▲155.59 ▲0.0088.97 ▼8.7836.96 ▼5.65
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0035.87 ▼5.5434.66 ▼2.06
Add New Post /wp-admin/post-new.php1,526 ▼023.17 ▼0.13605.25 ▼89.7555.60 ▼0.20
Media Library /wp-admin/upload.php1,394 ▼94.19 ▼0.0398.91 ▼2.0941.80 ▼7.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tiny-yardage-calculator/rectangle.php
    • > /wp-content/plugins/tiny-yardage-calculator/circle.php
    • > /wp-content/plugins/tiny-yardage-calculator/triangle.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: rounding in wp-content/plugins/tiny-yardage-calculator/triangle.php on line 25
    • > PHP Notice
      Undefined variable: base_label in wp-content/plugins/tiny-yardage-calculator/triangle.php on line 34
    • > PHP Notice
      Undefined variable: width_label in wp-content/plugins/tiny-yardage-calculator/rectangle.php on line 34
    • > PHP Notice
      Undefined variable: rounding in wp-content/plugins/tiny-yardage-calculator/rectangle.php on line 22
    • > PHP Notice
      Undefined variable: result_label in wp-content/plugins/tiny-yardage-calculator/circle.php on line 38
    • > PHP Notice
      Undefined variable: form_label in wp-content/plugins/tiny-yardage-calculator/circle.php on line 27
    • > PHP Notice
      Undefined variable: depth_label in wp-content/plugins/tiny-yardage-calculator/circle.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tiny-yardage-calculator/tiny-yardage-calculator.php:62
    • > PHP Notice
      Undefined variable: result_label in wp-content/plugins/tiny-yardage-calculator/rectangle.php on line 44
    • > PHP Notice
      Undefined variable: rounding in wp-content/plugins/tiny-yardage-calculator/circle.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
3 plugin tags: yardage, calculate, calculator

tiny-yardage-calculator/tiny-yardage-calculator.php 92% from 13 tests

This is the main PHP file of "Tiny Yardage Calculator" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 201 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected136 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43433136

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin