10% disc-golf-metrix

Code Review | Disc Golf Metrix WP

WordPress plugin Disc Golf Metrix WP scored 10% from 54 tests.

About plugin

  • Plugin page: disc-golf-metrix
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 5.8.1
  • First release: Oct 4, 2017
  • Latest release: Oct 4, 2017
  • Number of updates: 7
  • Update frequency: every 3.6 days
  • Top authors: markosaviauk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 614 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/disc-golf-metrix/discgolfmetrix-results-table.php+82
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲0.02MB] [CPU: ▼155.22ms] Passed 4 tests

A check of server-side resources used by Disc Golf Metrix WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1332.86 ▲4.36
Dashboard /wp-admin3.08 ▲0.0253.66 ▼14.65
Posts /wp-admin/edit.php3.13 ▲0.0255.08 ▲1.35
Add New Post /wp-admin/post-new.php5.44 ▲0.0097.25 ▼600.53
Media Library /wp-admin/upload.php3.02 ▲0.0245.81 ▼7.06
Disc Golf Metrix /wp-admin/options-general.php?page=discgolfmetrix_options2.9934.76

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Disc Golf Metrix WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲11715.91 ▲0.2712.89 ▲0.9451.33 ▲1.77
Dashboard /wp-admin2,977 ▲465.92 ▲0.04158.38 ▼45.38123.67 ▼25.27
Posts /wp-admin/edit.php2,755 ▲162.73 ▲0.0377.81 ▲3.81104.53 ▲0.57
Add New Post /wp-admin/post-new.php1,690 ▲10918.41 ▲2.30421.02 ▼313.83125.17 ▼73.08
Media Library /wp-admin/upload.php1,817 ▲135.03 ▼0.05182.91 ▼27.21129.86 ▼28.72
Disc Golf Metrix /wp-admin/options-general.php?page=discgolfmetrix_options1,2022.5472.8577.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/disc-golf-metrix/discgolfmetrix-l10n.php:6

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 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: discgolfmetrix

disc-golf-metrix/discgolfmetrix.php 77% from 13 tests

"Disc Golf Metrix WP" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Name the main plugin file the same as the plugin slug ("disc-golf-metrix.php" instead of "discgolfmetrix.php")

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
Success! There were no dangerous files found in this plugin895 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP510120888
JavaScript2024
CSS3333

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity45.25
▷ Minimum class complexity4.00
▷ Maximum class complexity100.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods822.86%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions00.00%
▷ Anonymous functions11100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin