10% wocrl-leagues-and-personal-race-history

Code Review | WOCRL Leagues and Personal Race History

WordPress plugin WOCRL Leagues and Personal Race History scored 10% from 54 tests.

About plugin

  • Plugin page: wocrl-leagues-and...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Apr 1, 2020
  • Latest release: Apr 20, 2020
  • Number of updates: 5
  • Update frequency: every 7.6 days
  • Top authors: wocrl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 240 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/wocrl-leagues-and-personal-race-history/classes/wocrl-api.class.php+43
    Illegal string offset 'wocrl_api_key'

Server metrics [RAM: ▼0.77MB] [CPU: ▼341.57ms] Passed 4 tests

Analyzing server-side resources used by WOCRL Leagues and Personal Race History
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.098.26 ▼40.38
Dashboard /wp-admin3.62 ▲0.217.66 ▼27.96
Posts /wp-admin/edit.php3.62 ▼0.027.28 ▼29.97
Add New Post /wp-admin/post-new.php3.62 ▼3.389.35 ▼1,267.98
Media Library /wp-admin/upload.php3.62 ▲0.338.21 ▼17.67
WOCRL /wp-admin/options-general.php?page=wocrl-options3.628.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 137 new files
Database: no new tables, 1 new option
New WordPress options
wocrl_api_settings

Browser metrics Passed 4 tests

WOCRL Leagues and Personal Race History: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,941 ▲21516.22 ▲0.6210.29 ▲4.542.51 ▼0.33
Dashboard /wp-admin2,897 ▲366.03 ▼0.15117.12 ▼21.77152.89 ▼10.41
Posts /wp-admin/edit.php2,696 ▲53.23 ▼0.0162.33 ▼1.65133.94 ▼2.59
Add New Post /wp-admin/post-new.php1,776 ▲316.93 ▼4.80444.69 ▼78.23163.05 ▼107.71
Media Library /wp-admin/upload.php1,700 ▲25.53 ▼0.01135.18 ▼10.61188.01 ▼5.48
WOCRL /wp-admin/options-general.php?page=wocrl-options1,3222.4253.86125.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wocrl-leagues-and-personal-race-history/classes/wocrl-api.class.php+43
    Illegal string offset 'wocrl_api_key'
  • Zombie WordPress options detected upon uninstall: 1 option
    • wocrl_api_settings

Smoke tests 50% 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)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wocrl-options
    • > Warning in wp-content/plugins/wocrl-leagues-and-personal-race-history/classes/wocrl-api.class.php+43
    Illegal string offset 'wocrl_api_key'
    • > GET request to /wp-admin/options-general.php?page=wocrl-options
    • > Notice in wp-content/plugins/wocrl-leagues-and-personal-race-history/classes/wocrl-api.class.php+43
    Uninitialized string offset: 0

SRP 50% from 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
Almost there! Just fix the following items
  • 46× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/psr7/src/NoSeekStream.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/promises/src/Promise.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/psr7/src/DroppingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/psr7/src/UploadedFile.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Handler\\CurlFactoryInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/wocrl-leagues-and-personal-race-history/vendor/guzzlehttp/guzzle/src/Client.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
You can look at the official readme.txt

wocrl-leagues-and-personal-race-history/index.php 92% from 13 tests

Analyzing the main PHP file in "WOCRL Leagues and Personal Race History" version 1.2
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wocrl-leagues-and-personal-race-history.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected18,802 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
PHP962,1685,10712,200
Markdown101,01203,221
SVG1002,671
JSON700488
CSS2210148
JavaScript2121255
Dockerfile18010
make1409

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity17.84
▷ Minimum class complexity1.00
▷ Maximum class complexity374.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces8
Interfaces15
Traits2
Classes65
▷ Abstract classes00.00%
▷ Concrete classes65100.00%
▷ Final classes913.85%
Methods683
▷ Static methods679.81%
▷ Public methods56482.58%
▷ Protected methods40.59%
▷ Private methods11516.84%
Functions164
▷ Named functions6439.02%
▷ Anonymous functions10060.98%
Constants54
▷ Global constants00.00%
▷ Class constants54100.00%
▷ Public constants54100.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
There are no PNG files in this plugin