84% woo-prism

Code Review | WooCommerce Prism

WordPress plugin WooCommerce Prism scored84%from 54 tests.

About plugin

  • Plugin page: woo-prism
  • Plugin version: 0.2.8.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.9.0
  • WordPress version: 6.3.1
  • First release: Apr 17, 2017
  • Latest release: Dec 4, 2017
  • Number of updates: 68
  • Update frequency: every 3.4 days
  • Top authors: omarxpstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,481 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
Install script ran successfully

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

Server-side resources used by WooCommerce Prism
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.43 ▼1.24
Dashboard /wp-admin3.31 ▲0.0058.61 ▲8.45
Posts /wp-admin/edit.php3.36 ▲0.0049.95 ▼1.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.45 ▼15.56
Media Library /wp-admin/upload.php3.23 ▲0.0034.73 ▼3.76

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Prism
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.69 ▼1.004.25 ▲2.4436.51 ▼7.04
Dashboard /wp-admin2,206 ▲154.94 ▲0.07109.53 ▲1.5643.29 ▼1.42
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0038.99 ▲1.6334.86 ▼1.48
Add New Post /wp-admin/post-new.php1,533 ▲1323.45 ▲0.15603.55 ▼104.5247.38 ▼13.72
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0597.64 ▼9.3944.03 ▲1.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Resource' not found in wp-content/plugins/woo-prism/wc-api/prism-shipping-charges.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Resource' not found in wp-content/plugins/woo-prism/wc-api/prism-ping.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PrismappIoWebhook' not found in wp-content/plugins/woo-prism/includes/class-prism-ping-webhook.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Resource' not found in wp-content/plugins/woo-prism/wc-api/prism-search.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PrismappIoWebhook' not found in wp-content/plugins/woo-prism/includes/class-prism-get-product-webhook.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Resource' not found in wp-content/plugins/woo-prism/wc-api/prism-ucp-items.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PrismappIoWebhook' not found in wp-content/plugins/woo-prism/includes/class-prism-search-area-webhook.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Resource' not found in wp-content/plugins/woo-prism/wc-api/prism-ucp-buyers.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PrismappIoWebhook' not found in wp-content/plugins/woo-prism/includes/class-prism-search-webhook.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_API_Resource' not found in wp-content/plugins/woo-prism/wc-api/prism-area.php:3

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 93% 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
4 plugin tags: chat to buy, prismapp, chat commerce, prism

woo-prism/woocommerce-prismappio.php 85% from 13 tests

Analyzing the main PHP file in "WooCommerce Prism" version 0.2.8.10
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-prism.php" instead of "woocommerce-prismappio.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,575 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP254903382,469
Markdown225076
Bourne Shell3101330

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.38
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods118
▷ Static methods2218.64%
▷ Public methods9479.66%
▷ Protected methods00.00%
▷ Private methods2420.34%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin