10% wppaybox

Code Review | wppaybox

WordPress plugin wppaybox scored10%from 54 tests.

About plugin

  • Plugin page: wppaybox
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.4-3.0.4
  • WordPress version: 6.3.1
  • First release: Jun 10, 2011
  • Latest release: Oct 4, 2011
  • Number of updates: 4
  • Update frequency: every 67.5 days
  • Top authors: Eoxia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,600 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/options/db_options.class.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; wpaybox_db_option has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼52.53ms] Passed 4 tests

This is a short check of server-side resources used by wppaybox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.07 ▼32.41
Dashboard /wp-admin2.08 ▼1.267.15 ▼52.21
Posts /wp-admin/edit.php2.08 ▼1.276.17 ▼38.22
Add New Post /wp-admin/post-new.php2.08 ▼3.808.16 ▼87.26
Media Library /wp-admin/upload.php2.08 ▼1.146.32 ▼28.70
Formulaires /wp-admin/admin.php?page=wpaybox_forms2.086.72
Paybox /wp-admin/options-general.php?page=wpaybox_options2.087.32
Offres /wp-admin/admin.php?page=wpaybox_offers2.087.37
Commandes /wp-admin/admin.php?page=wpaybox_orders2.086.81

Server storage [IO: ▲1.11MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 48 new files
Database: 4 new tables, 9 new options
New tables
wp_wppaybox__forms
wp_wppaybox__orders
wp_wppaybox__offers
wp_wppaybox__forms_offers_link
New WordPress options
theysaidso_admin_options
wpaybox_store_urloption
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
wpaybox_store_mainoption
widget_theysaidso_widget
wpaybox_db_option

Browser metrics Passed 4 tests

An overview of browser requirements for wppaybox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17313.85 ▼0.508.19 ▲6.4844.15 ▼4.04
Dashboard /wp-admin2,238 ▲585.62 ▼0.0781.99 ▼10.1439.15 ▼10.42
Posts /wp-admin/edit.php2,143 ▲432.01 ▲0.0235.90 ▲1.3733.17 ▼3.86
Add New Post /wp-admin/post-new.php1,562 ▲3623.38 ▲0.32596.40 ▼53.2949.66 ▼3.87
Media Library /wp-admin/upload.php1,443 ▲434.20 ▼0.03107.74 ▲14.8948.56 ▲3.61
Formulaires /wp-admin/admin.php?page=wpaybox_forms8571.8624.3124.72
Paybox /wp-admin/options-general.php?page=wpaybox_options9441.8622.3533.42
Offres /wp-admin/admin.php?page=wpaybox_offers8811.8926.7825.14
Commandes /wp-admin/admin.php?page=wpaybox_orders8671.8925.0624.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/options/db_options.class.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; wpaybox_db_option has a deprecated constructor
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_wppaybox__forms_offers_link
    • wp_wppaybox__orders
    • wp_wppaybox__forms
    • wp_wppaybox__offers
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpaybox_store_mainoption
    • wpaybox_db_option
    • wpaybox_store_urloption
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/options/db_options.class.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; wpaybox_db_option has a deprecated constructor
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_init::wpaybox_plugin_load() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/init.class.php+39
    Non-static method wpaybox_database::wpaybox_db_update() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_init::wpaybox_front_css() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_init::wpaybox_front_js() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_init::wpaybox_menu() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/init.class.php+72
    Non-static method wpaybox_orders::pageTitle() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/init.class.php+73
    Non-static method wpaybox_payment_form::pageTitle() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/init.class.php+74
    Non-static method wpaybox_offers::pageTitle() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_init::wpaybox_admin_css() should not be called statically
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_init::wpaybox_admin_js() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_display::displayPage() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/display.class.php+93
    Non-static method wpaybox_tools::varSanitizer() should not be called statically
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/display.class.php+141
    Non-static method wpaybox_display::getPageIconInformation() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_offers
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/offers.class.php+295
    Undefined variable: element
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_offers
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/offers.class.php+295
    Trying to get property 'id' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/orders.class.php+225
    Non-static method wpaybox_display::getTable() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/display.class.php+174
    Non-static method wpaybox_display::displayPageHeader() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/display.class.php+180
    Non-static method wpaybox_display::displayPageFooter() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpaybox_option::doOptionsPage() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method wpaybox_option::storeConfigForm() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::storeTpe() should not be called statically
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/options/options.class.php+320
    Non-static method wpaybox_option::getStoreConfigOption() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/options/options.class.php+324
    Non-static method wpaybox_form::check_input_type() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/form.class.php+76
    Undefined index: option
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/form.class.php+81
    Undefined index: valueToPut
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/form.class.php+101
    Non-static method wpaybox_form::form_input() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::storeRang() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::storeIdentifier() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::urlCgi() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::environnement() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-content/plugins/wppaybox/includes/librairies/form.class.php+113
    Non-static method wpaybox_form::form_input_select() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1771
    Non-static method wpaybox_option::urlConfigForm() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::urlSuccess() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::urlCanceled() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpaybox_options
    • > Deprecated in wp-admin/includes/template.php+1824
    Non-static method wpaybox_option::urlDeclined() should not be called statically
    • > GET request to /wp-admin/admin.php?page=wpaybox_offers
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/offers.class.php+108
    Undefined index: wp_wppaybox__offers
    • > GET request to /wp-admin/admin.php?page=wpaybox_offers
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/offers.class.php+108
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=wpaybox_offers
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/offers.class.php+109
    Undefined index: payment_recurrent_amount
    • > GET request to /wp-admin/admin.php?page=wpaybox_orders
    • > Notice in wp-content/plugins/wppaybox/includes/librairies/orders.class.php+124
    Undefined variable: actionResult

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
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wppaybox/includes/languages/db_filed_list.php:12
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/wppaybox/includes/configs/config.php): failed to open stream: No such file or directory in wp-content/plugins/wppaybox/wppaybox.php on line 26
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wppaybox/includes/configs/config.php on line 59
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppaybox/includes/configs/config.php on line 37
    • > PHP Warning
      Use of undefined constant WPAYBOX_PLUGIN_DIR - assumed 'WPAYBOX_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppaybox/includes/configs/config.php on line 38
    • > PHP Warning
      Use of undefined constant WPAYBOX_LIB_PLUGIN_DIR - assumed 'WPAYBOX_LIB_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppaybox/includes/includes.php on line 39
    • > PHP Warning
      Use of undefined constant WPAYBOX_PLUGIN_DIR - assumed 'WPAYBOX_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppaybox/includes/configs/config.php on line 37
    • > PHP Fatal error
      require_once(): Failed opening required 'WPAYBOX_LIB_PLUGIN_DIRpayment_forms.class.php' (include_path='.:/usr/share/php') in wp-content/plugins/wppaybox/includes/includes.php on line 39
    • > PHP Warning
      require_once(WPAYBOX_LIB_PLUGIN_DIRpayment_forms.class.php): failed to open stream: No such file or directory in wp-content/plugins/wppaybox/includes/includes.php on line 39
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wppaybox/wppaybox.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Page de configuration du plugin, avec les identifiants de votre site chez Paybox et les urls de retour), #2 (Page d'ajout d'une offre de paiment unique), #3 (Page d'ajout d'une offre de paiement par abonnement), #4 (Liste des offres existantes), #5 (Page d'édition d'une offre existante), #6 (Page d'ajout de formulaire), #7 (Page d'édition de formulaire, avec le code à insérer dans la page), #8 (Liste des formulaires existants), #9 (Affichage du formulaire dans la partie "frontend" de votre site), #10 (Ajout du code du formulaire dans la page voulue), #11 (Liste des commandes passées), #12 (Visualisation d'une commande avec les détails)
You can take inspiration from this readme.txt

wppaybox/wppaybox.php Passed 13 tests

The entry point to "wppaybox" version 1.3 is a PHP file that has certain tags in its header comment area
70 characters long description:
This plugin allows to add a paybox payment form on a wordpress website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,959 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP163899903,024
CSS346155439
PO File1158202329
JavaScript198167

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity42.82
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity5.60
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods100
▷ Static methods00.00%
▷ Public methods100100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
25 PNG files occupy 0.87MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
medias/jquery-ui/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
medias/jquery-ui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
screenshot-11.png38.81KB15.93KB▼ 58.96%
screenshot-6.png52.10KB22.50KB▼ 56.82%
medias/jquery-ui/ui-bg_glass_75_e6e6e6_1x400.png0.15KB0.14KB▼ 6.62%