88% knvb-api

Code Review | KNVB Api plugin

WordPress plugin KNVB Api plugin scored 88% from 54 tests.

About plugin

  • Plugin page: knvb-api
  • Plugin version: 1.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 5.8.1
  • First release: Dec 30, 2014
  • Latest release: Apr 18, 2016
  • Number of updates: 41
  • Update frequency: every 11.6 days
  • Top authors: hoest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,856 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼150.11ms] Passed 4 tests

This is a short check of server-side resources used by KNVB Api plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.1725.03 ▲2.30
Dashboard /wp-admin3.24 ▲0.1731.11 ▼7.88
Posts /wp-admin/edit.php3.35 ▲0.2431.93 ▲2.64
Add New Post /wp-admin/post-new.php5.60 ▲0.1693.76 ▼595.65
Media Library /wp-admin/upload.php3.18 ▲0.1724.32 ▲0.81
KNVB API /wp-admin/options-general.php?page=knvb-api-menu3.13187.28

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by KNVB Api plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,676 ▲7515.95 ▲0.304.88 ▼1.3175.33 ▲4.17
Dashboard /wp-admin2,935 ▲406.11 ▼0.04111.07 ▼17.99160.43 ▼10.10
Posts /wp-admin/edit.php2,745 ▲53.23 ▲0.0164.10 ▼3.93141.12 ▲2.78
Add New Post /wp-admin/post-new.php3,810 ▲319.03 ▲0.22444.05 ▲22.63167.99 ▲3.37
Media Library /wp-admin/upload.php1,757 ▲55.54 ▼0.00141.31 ▲5.28191.07 ▲16.25
KNVB API /wp-admin/options-general.php?page=knvb-api-menu1,1142.3352.61125.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=knvb-api-menu
    • > Notice in wp-content/plugins/knvb-api/knvb-client.php+38
    Undefined property: stdClass::$List
    • > GET request to /wp-admin/options-general.php?page=knvb-api-menu
    • > Notice in wp-content/plugins/knvb-api/knvb-client.php+38
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=knvb-api-menu
    • > Notice in wp-content/plugins/knvb-api/knvb-client.php+38
    Trying to get property 'PHPSESSID' of non-object

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 add_shortcode() in wp-content/plugins/knvb-api/knvb-api-plugin.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 96% 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
5 plugin tags: voetbal, soccer, api, dutch, knvb

knvb-api/knvb-api-plugin.php 92% from 13 tests

The main PHP file in "KNVB Api plugin" ver. 1.13 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("knvb-api.php" instead of "knvb-api-plugin.php")

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
No dangerous file extensions were detected1,092 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot 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.40
Average class complexity25.20
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
▷ Static methods14.00%
▷ Public methods1664.00%
▷ Protected methods936.00%
▷ Private methods00.00%
▷ Named functions666.67%
▷ Anonymous functions333.33%
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin