78% product-display-for-opencart

Code Review | Product Display for OpenCart

WordPress plugin Product Display for OpenCart 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 12, 2017
  • Latest release: Apr 9, 2018
  • Number of updates: 4
  • Update frequency: every 68.0 days
  • Top authors: scottcwilson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,359 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.59ms] Passed 4 tests

This is a short check of server-side resources used by Product Display for OpenCart
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.99 ▼5.81
Dashboard /wp-admin3.33 ▲0.0346.72 ▼7.29
Posts /wp-admin/edit.php3.38 ▲0.0248.61 ▼5.74
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.79 ▲7.25
Media Library /wp-admin/upload.php3.26 ▲0.0235.72 ▲0.48
Product Display for OpenCart /wp-admin/options-general.php?page=opencart_product_display_3.2028.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Display for OpenCart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.30 ▼1.081.73 ▼0.2340.30 ▼4.78
Dashboard /wp-admin2,212 ▲215.84 ▲0.0299.96 ▼2.5440.26 ▼0.49
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0940.86 ▼0.2333.28 ▼4.23
Add New Post /wp-admin/post-new.php1,533 ▲1423.16 ▲0.09649.65 ▲37.9851.18 ▼0.16
Media Library /wp-admin/upload.php1,397 ▲124.21 ▲0.0798.38 ▼4.8542.02 ▼3.66
Product Display for OpenCart /wp-admin/options-general.php?page=opencart_product_display_7792.0324.3724.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=opencart_product_display_
    • > Notice in wp-content/plugins/product-display-for-opencart/product_display_for_opencart.php+117
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-display-for-opencart/product_display_for_opencart.php:75

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: opencart

product-display-for-opencart/product_display_for_opencart.php 77% from 13 tests

This is the main PHP file of "Product Display for OpenCart" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-display-for-opencart.php" instead of "product_display_for_opencart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin102 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1402192
CSS10510

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
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%
Functions7
▷ Named functions7100.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
There were not PNG files found in your plugin