62% tariffuxx

Code Review | TARIFFUXX

WordPress plugin TARIFFUXX scored62%from 54 tests.

About plugin

  • Plugin page: tariffuxx
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 3, 2022
  • Latest release: Sep 12, 2023
  • Number of updates: 11
  • Update frequency: every 42.4 days
  • Top authors: tariffuxx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /392 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.14MB] [CPU: ▼46.68ms] Passed 4 tests

This is a short check of server-side resources used by TARIFFUXX
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6515.58 ▼27.60
Dashboard /wp-admin2.88 ▼0.4215.83 ▼40.21
Posts /wp-admin/edit.php2.88 ▼0.4718.05 ▼34.24
Add New Post /wp-admin/post-new.php2.88 ▼3.0016.68 ▼84.65
Media Library /wp-admin/upload.php2.88 ▼0.3514.45 ▼21.46
Vergleiche & Widgets /wp-admin/admin.php?page=tariffuxx2.8818.21
Über TARIFFUXX /wp-admin/admin.php?page=tariffuxx_infos2.8816.74
Erstellen /wp-admin/admin.php?page=tariffuxx_twl2.8817.38
Einstellungen /wp-admin/admin.php?page=tariffuxx_options2.8817.34

Server storage [IO: ▲1.64MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/tariffuxx/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 63 new files
Database: 1 new table, 7 new options
New tables
wp_tariffuxx_twl
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
tariffuxx_twl_version
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for TARIFFUXX
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.28 ▼0.885.05 ▲3.1940.69 ▼2.19
Dashboard /wp-admin2,258 ▲584.88 ▼0.94107.27 ▲1.7380.97 ▲42.09
Posts /wp-admin/edit.php2,137 ▲372.01 ▼0.0033.33 ▼7.8332.14 ▼3.02
Add New Post /wp-admin/post-new.php1,554 ▲2323.29 ▼0.10678.93 ▲38.4448.31 ▼1.11
Media Library /wp-admin/upload.php1,434 ▲344.13 ▼0.07103.67 ▲4.7168.25 ▲21.66
Vergleiche & Widgets /wp-admin/admin.php?page=tariffuxx9082.0127.6850.15
Über TARIFFUXX /wp-admin/admin.php?page=tariffuxx_infos9671.8126.0849.83
Erstellen /wp-admin/admin.php?page=tariffuxx_twl1,2222.0327.6441.52
Einstellungen /wp-admin/admin.php?page=tariffuxx_options9072.0328.2533.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/tariffuxx/classes/Tariffuxx_twl.php+34
    Undefined index: tariffuxx_konfigurator_script
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_options
    • > Notice in wp-content/plugins/tariffuxx/classes/Tariffuxx_twl.php+34
    Undefined index: tariffuxx_konfigurator_script
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_options
    • > Notice in wp-content/plugins/tariffuxx/classes/Tariffuxx_twl.php+20
    Undefined index: step
    • > GET request to /wp-admin/admin.php?page=tariffuxx
    • > Notice in wp-content/plugins/tariffuxx/classes/Tariffuxx_admin.php+56
    Undefined index: delete_twl_id
    • > GET request to /wp-admin/admin.php?page=tariffuxx
    • > Notice in wp-content/plugins/tariffuxx/classes/Tariffuxx_admin.php+57
    Undefined index: clone_twl_id
  • 45 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+166
    Undefined variable: config_data
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+166
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+28
    Trying to get property 'description' of non-object
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+43
    Trying to get property 'sub_id' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+161
    Trying to get property 'ref_product_type_id' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+103
    Trying to get property 'product_type_mobile_tool_preselection' of non-object
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+124
    Trying to get property 'product_type_fixed_line_tool_preselection' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tariffuxx_twl
    • > Notice in wp-content/plugins/tariffuxx/views/twl/step_1.php+150
    Trying to get property 'product_type_mobile_data_tool_preselection' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tariffuxx/views/twl/no_configurator.php
    • > /wp-content/plugins/tariffuxx/views/common/json.php
    • > /wp-content/plugins/tariffuxx/views/twl/iframe_script.php
    • > /wp-content/plugins/tariffuxx/views/dashboard/dashboard.php
    • > /wp-content/plugins/tariffuxx/views/twl/step_2_mobile_tool.php
    • > /wp-content/plugins/tariffuxx/views/common/previewModal.php
  • 106× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: config_data in wp-content/plugins/tariffuxx/views/twl/step_2_mobile_tool.php on line 1
    • > PHP Warning
      include(TARIFFUXX_PLUGIN_PATH/views/twl/checkbox_card.php): failed to open stream: No such file or directory in wp-content/plugins/tariffuxx/views/twl/step_2_fixed_line.php on line 46
    • > PHP Warning
      include(): Failed opening 'TARIFFUXX_PLUGIN_PATH/views/twl/stepper.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/tariffuxx/views/twl/step_2.php on line 26
    • > PHP Warning
      Use of undefined constant TARIFFUXX_PLUGIN_PATH - assumed 'TARIFFUXX_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tariffuxx/views/twl/step_2.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/tariffuxx/views/twl/stepper.php:27
    • > PHP Warning
      Use of undefined constant TARIFFUXX_PLUGIN_PATH - assumed 'TARIFFUXX_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tariffuxx/views/twl/step_2_mobile_tool.php on line 177
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tariffuxx/main.php:18
    • > PHP Notice
      Trying to get property 'ref_product_type_id' of non-object in wp-content/plugins/tariffuxx/views/twl/step_3.php on line 5
    • > PHP Warning
      Use of undefined constant TARIFFUXX_PLUGIN_PATH - assumed 'TARIFFUXX_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tariffuxx/views/twl/step_2_mobile_tool.php on line 177
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tariffuxx/classes/Tariffuxx_admin.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% 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:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can look at the official readme.txt

tariffuxx/main.php 85% from 13 tests

This is the main PHP file of "TARIFFUXX" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 282 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("tariffuxx.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,031 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP28203371,720
JavaScript113482441,674
CSS810888628
HTML1109

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
assets/tariffuxx-icon.png2.04KB0.72KB▼ 64.51%