79% guild-wars-2-wvw-matchups

Code Review | Guild Wars 2 - WvW Matchups

WordPress plugin Guild Wars 2 - WvW Matchups scored 79% from 54 tests.

About plugin

  • Plugin page: guild-wars-2-wvw-...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 5.8.1
  • First release: Jun 22, 2013
  • Latest release: May 11, 2015
  • Number of updates: 105
  • Update frequency: every 6.6 days
  • Top authors: klaufel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,314 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
Install script ran successfully

Server metrics [RAM: ▼1.75MB] [CPU: ▼194.14ms] Passed 4 tests

Analyzing server-side resources used by Guild Wars 2 - WvW Matchups
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.955.30 ▼30.94
Dashboard /wp-admin1.91 ▼1.155.03 ▼43.65
Posts /wp-admin/edit.php1.91 ▼1.207.33 ▼41.79
Add New Post /wp-admin/post-new.php1.91 ▼3.535.58 ▼660.17
Media Library /wp-admin/upload.php1.91 ▼1.105.67 ▼27.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 1 new option
New WordPress options
widget_gw2_wvw_matchups

Browser metrics Passed 4 tests

Guild Wars 2 - WvW Matchups: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲13715.78 ▲0.178.97 ▼1.1850.22 ▼4.88
Dashboard /wp-admin2,991 ▲605.94 ▼0.20149.73 ▲2.85120.12 ▼0.58
Posts /wp-admin/edit.php2,741 ▲22.69 ▼0.0165.52 ▼3.6592.08 ▼1.90
Add New Post /wp-admin/post-new.php1,685 ▲1318.31 ▼0.58402.42 ▲10.07118.32 ▲6.09
Media Library /wp-admin/upload.php1,812 ▲24.99 ▼0.03159.54 ▼9.51128.53 ▼0.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the gw2-wvw-matchups handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_gw2_wvw_matchups

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can take inspiration from this readme.txt

guild-wars-2-wvw-matchups/gw2-wvw-matchups.php 92% from 13 tests

The main PHP script in "Guild Wars 2 - WvW Matchups" version 2.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("guild-wars-2-wvw-matchups.php" instead of "gw2-wvw-matchups.php")

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
There were no executable files found in this plugin784 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4138293520
PO File48080238
CSS13426

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.25
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods3291.43%
▷ Protected methods00.00%
▷ Private methods38.57%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/gw2-wvw-matchups.png1.92KB1.45KB▼ 24.43%