89% woo-call-for-price

Code Review | Woocommerce Call for Price

WordPress plugin Woocommerce Call for Price scored 89% from 54 tests.

About plugin

  • Plugin page: woo-call-for-price
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 14, 2017
  • Latest release: Nov 14, 2017
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: arifrohmanhakim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 555 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Woocommerce Call for Price
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.20 ▼1.45
Dashboard /wp-admin3.33 ▲0.0342.36 ▼3.09
Posts /wp-admin/edit.php3.45 ▲0.0945.15 ▼5.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.23 ▼1.09
Media Library /wp-admin/upload.php3.26 ▲0.0333.64 ▲1.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce Call for Price
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲4213.21 ▲0.002.02 ▲0.2741.85 ▼8.89
Dashboard /wp-admin2,212 ▲35.88 ▲0.03104.84 ▼4.7439.23 ▼2.96
Posts /wp-admin/edit.php2,094 ▲22.03 ▲0.0335.37 ▼4.3334.87 ▲0.05
Add New Post /wp-admin/post-new.php1,539 ▲523.32 ▲0.06669.84 ▲30.0655.23 ▲2.15
Media Library /wp-admin/upload.php1,397 ▲64.24 ▲0.00102.91 ▲2.4742.51 ▼4.80

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
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 a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
You can take inspiration from this readme.txt

woo-call-for-price/woo-call-for-price.php 85% from 13 tests

The main file in "Woocommerce Call for Price" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected209 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP456119202
CSS1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.25
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods20
▷ Static methods15.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected