78% wp-tipi

Code Review | TIPI

WordPress plugin TIPI scored 78% from 54 tests.

About plugin

  • Plugin page: wp-tipi
  • Plugin version: 1.1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 5.8.1
  • First release: Jul 5, 2017
  • Latest release: Aug 24, 2017
  • Number of updates: 21
  • Update frequency: every 2.4 days
  • Top authors: eoni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼142.65ms] Passed 4 tests

Analyzing server-side resources used by TIPI
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1338.37 ▲11.09
Dashboard /wp-admin3.26 ▲0.2150.74 ▲2.15
Posts /wp-admin/edit.php3.31 ▲0.2051.13 ▲3.01
Add New Post /wp-admin/post-new.php5.56 ▲0.1392.89 ▼571.48
Media Library /wp-admin/upload.php3.14 ▲0.1434.33 ▼4.29
Tipi Invoices Types /wp-admin/edit.php?post_type=tipi_objet3.1836.70
All Tipi Faqs /wp-admin/edit.php?post_type=tipi_faq3.1834.30
Add New /wp-admin/post-new.php?post_type=tipi_faq3.2752.57
Add New /wp-admin/post-new.php?post_type=tipi_objet3.2149.69

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 1 new option
New WordPress options
tipi_gateway_settings_option_name

Browser metrics Passed 4 tests

A check of browser resources used by TIPI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,784 ▲18816.01 ▲0.2711.18 ▲1.3249.49 ▲2.24
Dashboard /wp-admin3,048 ▲1175.91 ▼0.30144.13 ▼9.50109.08 ▼7.05
Posts /wp-admin/edit.php2,820 ▲812.71 ▼0.0065.17 ▼2.8286.51 ▼5.67
Add New Post /wp-admin/post-new.php1,737 ▲23916.81 ▼2.01405.31 ▼18.06115.26 ▲3.62
Media Library /wp-admin/upload.php1,891 ▲845.02 ▼0.03148.96 ▼31.29121.53 ▼5.04
Tipi Invoices Types /wp-admin/edit.php?post_type=tipi_objet1,4772.6570.1875.23
All Tipi Faqs /wp-admin/edit.php?post_type=tipi_faq1,4772.6368.1174.05
Add New /wp-admin/post-new.php?post_type=tipi_faq2,9628.99227.59131.23
Add New /wp-admin/post-new.php?post_type=tipi_objet2,0963.3592.8485.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • tipi_gateway_settings_option_name

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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-tipi/admin/partials/tipi-admin-header.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-tipi/public/partials/faq.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-tipi/public/partials/confirmation-tipi.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-tipi/public/partials/tipi-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-tipi/admin/partials/tipi-admin-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/wp-tipi/public/partials/objet-type.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: city hall, e-commerce, credit card, collectivity, mairie...

wp-tipi/tipi.php 92% from 13 tests

The main PHP script in "TIPI" version 1.1.7.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-tipi.php" instead of "tipi.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
No dangerous file extensions were detected1,573 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP16174530739
JavaScript49956372
SVG100288
PO File14143113
CSS332061

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.71
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods44
▷ Static methods36.82%
▷ Public methods3988.64%
▷ Protected methods00.00%
▷ Private methods511.36%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin