10% portgorod-ocstore-opencart-product-widget

Code Review | Portgorod OcStore & Opencart product widget

WordPress plugin Portgorod OcStore & Opencart product widget scored10%from 54 tests.

About plugin

  • Plugin page: portgorod-ocstore...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Oct 29, 2013
  • Latest release: Jan 10, 2014
  • Number of updates: 5
  • Update frequency: every 15.6 days
  • Top authors: Usernaprimer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,276 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/portgorod-ocstore-opencart-product-widget/portgorod_opencart.php+845
    syntax error, unexpected '}', expecting end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.46ms] Passed 4 tests

A check of server-side resources used by Portgorod OcStore & Opencart product widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.89 ▲4.67
Dashboard /wp-admin3.31 ▲0.0047.48 ▼2.25
Posts /wp-admin/edit.php3.36 ▲0.0047.67 ▼2.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.94 ▼17.90
Media Library /wp-admin/upload.php3.23 ▲0.0035.99 ▼3.63

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Portgorod OcStore & Opencart product widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.031.63 ▼0.4840.23 ▼0.41
Dashboard /wp-admin2,209 ▲275.84 ▼0.02107.55 ▼0.7140.96 ▼1.20
Posts /wp-admin/edit.php2,098 ▲62.04 ▼0.0249.05 ▲7.4747.42 ▲7.03
Add New Post /wp-admin/post-new.php1,547 ▲3418.44 ▲0.63623.53 ▲5.3172.52 ▲24.78
Media Library /wp-admin/upload.php1,388 ▲34.23 ▲0.0197.52 ▼7.0043.68 ▲0.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php
  • 23× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: por_img_url in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 7
    • > PHP Notice
      Undefined variable: por_url in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 8
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/portgorod-ocstore-opencart-product-widget/portgorod_opencart.php on line 845
    • > PHP Notice
      Undefined variable: por_template_class in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 9
    • > PHP Notice
      Undefined variable: por_template_class in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 8
    • > PHP Notice
      Undefined variable: por_url in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 7
    • > PHP Notice
      Undefined variable: por_beforeprice in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 9
    • > PHP Notice
      Undefined variable: por_template_class in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 13
    • > PHP Notice
      Undefined variable: por_seo_main_dom in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 13
    • > PHP Notice
      Undefined variable: por_img_width in wp-content/plugins/portgorod-ocstore-opencart-product-widget/oc_product_tmp_1.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === portgorod-ocstore-opencart-product-widget === )
The official readme.txt might help

portgorod-ocstore-opencart-product-widget/portgorod_opencart.php 92% from 13 tests

The main PHP file in "Portgorod OcStore & Opencart product widget" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("portgorod-ocstore-opencart-product-widget.php" instead of "portgorod_opencart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin856 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP313364820
CSS11036

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
close.png0.22KB0.11KB▼ 52.00%
success.png0.76KB0.81KB0.00%