78% product-display-for-prestashop

Code Review | Product Display for Prestashop

WordPress plugin Product Display for Prestashop scored78%from 54 tests.

About plugin

  • Plugin page: product-display-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.8
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: Apr 9, 2018
  • Number of updates: 3
  • Update frequency: every 86.3 days
  • Top authors: scottcwilson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,452 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.85ms] Passed 4 tests

Analyzing server-side resources used by Product Display for Prestashop
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.23 ▼8.76
Dashboard /wp-admin3.33 ▲0.0349.57 ▼2.06
Posts /wp-admin/edit.php3.39 ▲0.0354.15 ▲1.87
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.69 ▼14.05
Media Library /wp-admin/upload.php3.26 ▲0.0336.95 ▲1.49
Product Display for Prestashop /wp-admin/options-general.php?page=ps_product_display_3.2030.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Display for Prestashop
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6414.48 ▼0.281.66 ▼0.0539.85 ▼2.90
Dashboard /wp-admin2,212 ▲245.86 ▲0.01110.43 ▲5.7741.31 ▲1.15
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0440.61 ▼1.6239.32 ▲2.69
Add New Post /wp-admin/post-new.php1,533 ▲1323.25 ▲0.03658.96 ▼29.4658.10 ▲3.25
Media Library /wp-admin/upload.php1,397 ▲64.21 ▼0.0598.77 ▼8.0645.19 ▲2.82
Product Display for Prestashop /wp-admin/options-general.php?page=ps_product_display_8062.0221.7925.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ps_product_display_
    • > Notice in wp-content/plugins/product-display-for-prestashop/product_display_for_prestashop.php+182
    Trying to access array offset on value of type bool

SRP 50% 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-display-for-prestashop/product_display_for_prestashop.php:113

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: prestashop

product-display-for-prestashop/product_display_for_prestashop.php 77% from 13 tests

Analyzing the main PHP file in "Product Display for Prestashop" version 1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-display-for-prestashop.php" instead of "product_display_for_prestashop.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin157 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14924147
CSS10510

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin