90% catna-woo-name-your-price-and-offers

Code Review | Catna - Woo Name Your Price and Offers

WordPress plugin Catna - Woo Name Your Price and Offers scored90%from 54 tests.

About plugin

  • Plugin page: catna-woo-name-yo...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2021
  • Latest release: Jun 26, 2023
  • Number of updates: 15
  • Update frequency: every 41.3 days
  • Top authors: mytrinh (93.33%)villatheme (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.94ms] Passed 4 tests

This is a short check of server-side resources used by Catna - Woo Name Your Price and Offers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.62 ▼0.69
Dashboard /wp-admin3.34 ▲0.0342.94 ▼6.03
Posts /wp-admin/edit.php3.39 ▲0.0350.11 ▲5.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.46 ▲0.41
Media Library /wp-admin/upload.php3.26 ▲0.0334.99 ▲2.56

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Catna - Woo Name Your Price and Offers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.18 ▼0.181.76 ▲0.1248.78 ▲3.68
Dashboard /wp-admin2,200 ▲205.49 ▼0.1790.47 ▲1.5639.86 ▲0.04
Posts /wp-admin/edit.php2,108 ▲81.98 ▼0.0240.91 ▲4.5938.71 ▲1.41
Add New Post /wp-admin/post-new.php1,536 ▲1023.37 ▲0.28668.59 ▼23.1758.04 ▲1.71
Media Library /wp-admin/upload.php1,408 ▲84.28 ▲0.0995.26 ▲0.5746.96 ▲1.24

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
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
9 plugin tags: ecommerce, name your price for woocommerce, bargain, woocommerce, smart offers...

catna-woo-name-your-price-and-offers/catna-woo-name-your-price-and-offers.php Passed 13 tests

"Catna - Woo Name Your Price and Offers" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
128 characters long description:
Catna - Woo Name Your Price and Offers allows customers to purchase products at their optional price matched the conditions set.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin10,695 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP16951153,977
SVG30123,792
JavaScript1180651,687
CSS232261591,177
Sass117062

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity44.25
▷ Minimum class complexity2.00
▷ Maximum class complexity185.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods101
▷ Static methods1817.82%
▷ Public methods9594.06%
▷ Protected methods43.96%
▷ Private methods21.98%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/minicolors.png67.02KB34.31KB▼ 48.80%
assets/images/nyp_on_product_list.png70.63KB23.01KB▼ 67.42%