78% opencart-product-in-wp

Code Review | Opencart Product in WP

WordPress plugin Opencart Product in WP scored 78% from 54 tests.

About plugin

  • Plugin page: opencart-product-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 5.8.1
  • First release: Feb 20, 2015
  • Latest release: Mar 31, 2015
  • Number of updates: 4
  • Update frequency: every 9.7 days
  • Top authors: rajib.dewan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active / 3,580 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.87MB] [CPU: ▼170.86ms] Passed 4 tests

Analyzing server-side resources used by Opencart Product in WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1644.25 ▲20.51
Dashboard /wp-admin2.77 ▼0.2828.33 ▼18.30
Posts /wp-admin/edit.php2.78 ▼0.3325.04 ▼22.94
Add New Post /wp-admin/post-new.php2.77 ▼2.6618.56 ▼636.07
Media Library /wp-admin/upload.php2.78 ▼0.2328.80 ▼6.12
Opencart Product in WP /wp-admin/options-general.php?page=ocpwp_admin2.7824.02

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Opencart Product in WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲12815.91 ▲0.368.76 ▼0.1549.04 ▲2.54
Dashboard /wp-admin2,978 ▲445.91 ▼0.10144.51 ▼9.81120.03 ▲2.86
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0169.37 ▲1.0394.55 ▼0.61
Add New Post /wp-admin/post-new.php1,686 ▲18818.38 ▼0.52432.41 ▲40.29135.96 ▲18.87
Media Library /wp-admin/upload.php1,812 ▲55.00 ▼0.02172.05 ▲12.56137.08 ▲8.48
Opencart Product in WP /wp-admin/options-general.php?page=ocpwp_admin1,2002.2256.6683.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ocpwp_admin
    • > User deprecated in wp-includes/functions.php+5495
    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=ocpwp_admin
    • > Notice in wp-content/plugins/opencart-product-in-wp/ocpwp_admin.php+2
    Undefined index: ocpwp_hidden

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/opencart-product-in-wp/ocpwp_admin.php:29
    • > PHP Notice
      Undefined index: ocpwp_hidden in wp-content/plugins/opencart-product-in-wp/ocpwp_admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/opencart-product-in-wp/ocpwp.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: display product from opencart, opencart link to wordpress, opencart product, opencart in wordpress, opencart...

opencart-product-in-wp/ocpwp.php 92% from 13 tests

The main PHP script in "Opencart Product in WP" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("opencart-product-in-wp.php" instead of "ocpwp.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 detected297 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34212293
CSS1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected