83% safan-catalog-enquiry

Code Review | Safan Catalog & Enquiry For WooCommerce

WordPress plugin Safan Catalog & Enquiry For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: safan-catalog-enq...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: May 21, 2021
  • Latest release: May 21, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: largbasket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.46MB] [CPU: ▼0.27ms] Passed 4 tests

Server-side resources used by Safan Catalog & Enquiry For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4951.02 ▲9.95
Dashboard /wp-admin3.79 ▲0.4953.08 ▼1.95
Posts /wp-admin/edit.php3.84 ▲0.4956.45 ▲10.49
Add New Post /wp-admin/post-new.php6.31 ▲0.4391.91 ▼12.93
Media Library /wp-admin/upload.php3.65 ▲0.4342.10 ▲3.83
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.7237.90

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Safan Catalog & Enquiry For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.36 ▼0.311.80 ▲0.0843.72 ▲1.02
Dashboard /wp-admin2,229 ▲555.63 ▼0.0497.93 ▲5.4645.63 ▲2.43
Posts /wp-admin/edit.php2,143 ▲462.04 ▲0.0340.14 ▲3.7840.56 ▲2.29
Add New Post /wp-admin/post-new.php1,570 ▲3923.33 ▲0.10653.09 ▼20.9755.48 ▼2.51
Media Library /wp-admin/upload.php1,439 ▲364.24 ▲0.0299.33 ▼3.4346.27 ▲5.18
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9992.0526.1140.16

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/safan-catalog-enquiry/parts/form.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/safan-catalog-enquiry/lib/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/safan-catalog-enquiry/parts/style.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/safan-catalog-enquiry/parts/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/safan-catalog-enquiry/parts/remove-cart.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Setting Page), #2 (Product Archive Page), #3 (Single Product Page)
You can take inspiration from this readme.txt

safan-catalog-enquiry/scatalog.php 85% from 13 tests

"Safan Catalog & Enquiry For WooCommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("safan-catalog-enquiry.php" instead of "scatalog.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected2,264 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP85631,6842,067
PO File17980197

PHP code Passed 2 tests

A brief analysis 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.50
Average class complexity37.67
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods108
▷ Static methods109.26%
▷ Public methods8578.70%
▷ Protected methods2321.30%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin