10% wp-api-fftt

Code Review | wp-Api-FFTT

WordPress plugin wp-Api-FFTT scored10%from 54 tests.

About plugin

  • Plugin page: wp-api-fftt
  • Plugin version: 0.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Nov 16, 2015
  • Number of updates: 19
  • Update frequency: every 1.0 days
  • Top authors: robinos33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,088 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-api-fftt/WpApiFFTT.php+50
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.96MB] [CPU: ▲57.81ms] Passed 4 tests

Server-side resources used by wp-Api-FFTT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.44124.81 ▲82.89
Dashboard /wp-admin2.05 ▼1.26119.04 ▲61.78
Posts /wp-admin/edit.php2.05 ▼1.31115.09 ▲63.52
Add New Post /wp-admin/post-new.php2.05 ▼3.84124.25 ▲23.05
Media Library /wp-admin/upload.php2.05 ▼1.18134.53 ▲97.62
Joueurs /wp-admin/admin.php?page=joueurs_wpApiFFTT2.05114.10
Equipes /wp-admin/admin.php?page=equipes_wpApiFFTT2.05122.56
Données FFTT /wp-admin/admin.php?page=parametres_wpApiFFTT2.05126.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by wp-Api-FFTT
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲7413.26 ▼1.352.55 ▲0.1835.83 ▼4.76
Dashboard /wp-admin2,242 ▲545.91 ▲1.01103.14 ▼2.6041.09 ▼3.96
Posts /wp-admin/edit.php2,131 ▲392.06 ▲0.0037.20 ▼4.1332.30 ▼4.92
Add New Post /wp-admin/post-new.php1,546 ▲2721.00 ▼1.94689.53 ▲86.3255.12 ▲5.01
Media Library /wp-admin/upload.php1,430 ▲424.31 ▲0.14109.65 ▼2.0046.86 ▼0.24
Joueurs /wp-admin/admin.php?page=joueurs_wpApiFFTT6931.147.0322.15
Equipes /wp-admin/admin.php?page=equipes_wpApiFFTT6931.146.4221.06
Données FFTT /wp-admin/admin.php?page=parametres_wpApiFFTT8682.2021.8531.87

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-api-fftt/WpApiFFTT.php+50
    Trying to access array offset on value of type null
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=parametres_wpApiFFTT
    • > Notice in wp-content/plugins/wp-api-fftt/WpApiFFTT.php+50
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=parametres_wpApiFFTT
    • > Notice in wp-content/plugins/wp-api-fftt/Utils.php+23
    Undefined index: api

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-api-fftt/views/front-equipes.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: listeEquipes in wp-content/plugins/wp-api-fftt/views/front-equipes.php on line 4
    • > PHP Notice
      Undefined variable: joueurs in wp-content/plugins/wp-api-fftt/views/front-joueurs.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function getJoueurs() on null in wp-content/plugins/wp-api-fftt/views/front-joueurs.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getSessionApi() in wp-content/plugins/wp-api-fftt/views/admin-header.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-api-fftt/models/ParametresApiFFTT.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getSessionApi() in wp-content/plugins/wp-api-fftt/views/admin-header.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getSessionApi() in wp-content/plugins/wp-api-fftt/views/admin-header.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function getSessionApi() in wp-content/plugins/wp-api-fftt/views/admin-header.php:6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-api-fftt/views/front-equipes.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

wp-api-fftt/WpApiFFTT.php 92% from 13 tests

"wp-Api-FFTT" version 0.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-api-fftt.php" instead of "WpApiFFTT.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,212 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP18220118932
JavaScript3423148
CSS1214121
Markdown12011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity1.32
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods126
▷ Static methods43.17%
▷ Public methods12397.62%
▷ Protected methods00.00%
▷ Private methods32.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin