78% knvb-api

Code Review | KNVB Api plugin

WordPress plugin KNVB Api plugin scored78%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: 6.3.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

10+ active /2,109 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by KNVB Api plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1737.96 ▼8.33
Dashboard /wp-admin3.48 ▲0.1844.26 ▼5.96
Posts /wp-admin/edit.php3.59 ▲0.2444.41 ▲0.42
Add New Post /wp-admin/post-new.php6.06 ▲0.1792.28 ▲1.07
Media Library /wp-admin/upload.php3.40 ▲0.1735.38 ▲1.96
KNVB API /wp-admin/options-general.php?page=knvb-api-menu3.35307.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for KNVB Api plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.041.84 ▲0.1438.14 ▼12.15
Dashboard /wp-admin2,199 ▲255.62 ▼0.0586.45 ▼11.1738.73 ▼10.21
Posts /wp-admin/edit.php2,101 ▲11.95 ▲0.0038.19 ▲0.2833.66 ▲2.95
Add New Post /wp-admin/post-new.php1,538 ▲1018.27 ▼4.96669.37 ▲45.6056.57 ▲4.19
Media Library /wp-admin/upload.php1,404 ▲44.25 ▲0.0993.73 ▲0.1445.07 ▲3.57
KNVB API /wp-admin/options-general.php?page=knvb-api-menu8252.0324.0925.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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=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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > 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 shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: api, knvb, voetbal, dutch, soccer

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

The entry point to "KNVB Api plugin" version 1.13 is a PHP file that has certain tags in its header comment area
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
There were no executable files found in this plugin1,092 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP4338375714
HTML700221
Markdown139099
JavaScript19044
CSS13014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! 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
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods14.00%
▷ Public methods1664.00%
▷ Protected methods936.00%
▷ Private methods00.00%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants2
▷ 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
PNG images were not found in this plugin