10% wp-paypite-ecommerce

Code Review | WP Paypite Ecommerce

WordPress plugin WP Paypite Ecommerce scored10%from 54 tests.

About plugin

  • Plugin page: wp-paypite-ecommerce
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2018
  • Latest release: Nov 23, 2018
  • Number of updates: 15
  • Update frequency: every 1.1 days
  • Top authors: bizinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /604 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > 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.)

Server metrics [RAM: ▼1.97MB] [CPU: ▼58.61ms] Passed 4 tests

This is a short check of server-side resources used by WP Paypite Ecommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.58 ▼38.37
Dashboard /wp-admin2.05 ▼1.305.59 ▼54.92
Posts /wp-admin/edit.php2.05 ▼1.316.53 ▼42.15
Add New Post /wp-admin/post-new.php2.05 ▼3.845.36 ▼99.00
Media Library /wp-admin/upload.php2.05 ▼1.185.77 ▼27.64
Ajouter nouveau /wp-admin/admin.php?page=wp-add-product-paypite-ecommerce2.055.49
Shortcode /wp-admin/admin.php?page=wp-shortcode-paypite-ecommerce2.056.99
Paramètres /wp-admin/admin.php?page=wp-settings-paypite-ecommerce2.055.55
Tous les produits /wp-admin/admin.php?page=wp-paypite-ecommerce2.056.48
FAQ /wp-admin/admin.php?page=wp-faq-paypite-ecommerce2.055.72
Support /wp-admin/admin.php?page=wp-support-paypite-ecommerce2.055.96

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: 3 new tables, 6 new options
New tables
wp_paypite_products
wp_paypite_transactions
wp_paypite_settings
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Paypite Ecommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.67 ▼0.731.88 ▼0.0139.27 ▼5.97
Dashboard /wp-admin2,255 ▲645.85 ▲0.95109.99 ▲1.1545.21 ▼0.95
Posts /wp-admin/edit.php2,144 ▲552.03 ▼0.0239.04 ▲0.7845.40 ▲10.50
Add New Post /wp-admin/post-new.php1,407 ▼12120.73 ▼2.42600.24 ▼71.6438.74 ▼20.27
Media Library /wp-admin/upload.php1,443 ▲554.22 ▲0.03101.26 ▲5.3145.44 ▼0.97
Ajouter nouveau /wp-admin/admin.php?page=wp-add-product-paypite-ecommerce8612.1128.0134.23
Shortcode /wp-admin/admin.php?page=wp-shortcode-paypite-ecommerce8612.1227.4236.51
Paramètres /wp-admin/admin.php?page=wp-settings-paypite-ecommerce8532.0326.4534.09
Tous les produits /wp-admin/admin.php?page=wp-paypite-ecommerce8582.1223.0333.42
FAQ /wp-admin/admin.php?page=wp-faq-paypite-ecommerce8582.1226.8335.03
Support /wp-admin/admin.php?page=wp-support-paypite-ecommerce8612.1526.5634.53

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > 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.)
  • Zombie tables were found after uninstall: 3 tables
    • wp_paypite_products
    • wp_paypite_settings
    • wp_paypite_transactions
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 62 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-support-paypite-ecommerce
    • > 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.)
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-support-paypite-ecommerce
    • > Warning in wp-content/plugins/wp-paypite-ecommerce/classes/Manager.php+31
    Use of undefined constant FORM_VALIDATION_ERROR - assumed 'FORM_VALIDATION_ERROR' (this will throw an Error in a future version of PHP)
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-support-paypite-ecommerce
    • > Warning in wp-content/plugins/wp-paypite-ecommerce/classes/Manager.php+32
    Use of undefined constant WP_PAYPITE_ECOMMERCE_PLUGIN_URL - assumed 'WP_PAYPITE_ECOMMERCE_PLUGIN_URL' (this will throw an Error in a future version of PHP)
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-support-paypite-ecommerce
    • > Warning in wp-content/plugins/wp-paypite-ecommerce/classes/Manager.php+33
    Use of undefined constant CRYPTO_HELP - assumed 'CRYPTO_HELP' (this will throw an Error in a future version of PHP)
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-support-paypite-ecommerce
    • > Warning in wp-content/plugins/wp-paypite-ecommerce/classes/Manager.php+34
    Use of undefined constant CALLBACK_URL_HELP - assumed 'CALLBACK_URL_HELP' (this will throw an Error in a future version of PHP)

SRP 0% 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
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-paypite-ecommerce/views/admin/faq.php
    • > /wp-content/plugins/wp-paypite-ecommerce/views/admin/list.php
    • > /wp-content/plugins/wp-paypite-ecommerce/views/admin/shortcode.php
    • > /wp-content/plugins/wp-paypite-ecommerce/views/admin/support.php
  • 24× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/wp-paypite-ecommerce/views/front-end/output.php on line 76
    • > PHP Warning
      Use of undefined constant CALLBACK_URL_HELP - assumed 'CALLBACK_URL_HELP' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-paypite-ecommerce/views/admin/list.php on line 10
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/wp-paypite-ecommerce/views/front-end/output.php on line 73
    • > PHP Warning
      Use of undefined constant WP_PAYPITE_ECOMMERCE_PLUGIN_URL - assumed 'WP_PAYPITE_ECOMMERCE_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-paypite-ecommerce/views/admin/add.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PAYPITE_ECOMMERCE_PLUGIN_URLviews/admin/form.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-paypite-ecommerce/views/admin/update.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PAYPITE_ECOMMERCE_PLUGIN_URLviews/admin/form.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-paypite-ecommerce/views/admin/add.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-paypite-ecommerce/views/admin/confirm-deletion.php:7
    • > PHP Warning
      Use of undefined constant CRYPTO_HELP - assumed 'CRYPTO_HELP' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-paypite-ecommerce/views/admin/list.php on line 8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-paypite-ecommerce/views/front-end/output.php:77
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-paypite-ecommerce/views/admin/form.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: paypite, ecommerce, vente en ligne paypite

wp-paypite-ecommerce/wp-paypite-ecommerce.php Passed 13 tests

"WP Paypite Ecommerce" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
Vendez en ligne vos produits et services avec Paypite.

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
Everything looks great! No dangerous files found in this plugin1,038 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1514567758
CSS17120274
JavaScript1016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.33
▷ Minimum class complexity5.00
▷ Maximum class complexity32.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png3.87KB3.74KB▼ 3.33%