68% opencart-product-display

Code Review | OpenCart Product Display

WordPress plugin OpenCart Product Display scored68%from 54 tests.

About plugin

  • Plugin page: opencart-product-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Jun 19, 2013
  • Latest release: Sep 11, 2015
  • Number of updates: 7
  • Update frequency: every 116.3 days
  • Top authors: ajinkyanahar (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active /5,286 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.94MB] [CPU: ▼58.28ms] Passed 4 tests

A check of server-side resources used by OpenCart Product Display
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.76 ▼36.78
Dashboard /wp-admin2.08 ▼1.267.50 ▼58.44
Posts /wp-admin/edit.php2.08 ▼1.285.63 ▼44.77
Add New Post /wp-admin/post-new.php2.08 ▼3.815.97 ▼93.11
Media Library /wp-admin/upload.php2.08 ▼1.155.50 ▼28.83
OpenCart Product Display /wp-admin/options-general.php?page=OpenCartProductDisplay2.085.79

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for OpenCart Product Display
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▼0.381.63 ▼0.1643.37 ▼0.73
Dashboard /wp-admin2,199 ▲195.65 ▼0.0488.07 ▼12.5141.18 ▼3.75
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0839.58 ▲4.0236.93 ▲3.38
Add New Post /wp-admin/post-new.php1,531 ▲323.28 ▲0.30665.69 ▼18.0750.73 ▼3.21
Media Library /wp-admin/upload.php1,404 ▲14.22 ▼0.19104.37 ▼1.4845.71 ▼2.09
OpenCart Product Display /wp-admin/options-general.php?page=OpenCartProductDisplay7481.636.6618.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
    • > GET request to /wp-admin/options-general.php?page=OpenCartProductDisplay
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
    • > GET request to /wp-admin/options-general.php?page=OpenCartProductDisplay
    • > User deprecated in wp-includes/functions.php+5453
    Function register_widget_control is deprecated since version 2.8.0! Use wp_register_widget_control() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=OpenCartProductDisplay
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=OpenCartProductDisplay
    • > Notice in wp-content/plugins/opencart-product-display/opencart_import_admin.php+8
    Undefined index: opcimp_hidden

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: opcimp_hidden in wp-content/plugins/opencart-product-display/opencart_import_admin.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opencart-product-display/opencart_importer.php:150
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/opencart-product-display/opencart_import_admin.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The products being displayed on a WordPress site.), #2 (The widget in the WordPress admin window.)
The official readme.txt might help

opencart-product-display/opencart_importer.php 92% from 13 tests

This is the main PHP file of "OpenCart Product Display" version 1.0, 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("opencart-product-display.php" instead of "opencart_importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin143 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24538143

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin