83% woo-phone-number-required

Code Review | WooCommerce Phone Number Required

WordPress plugin WooCommerce Phone Number Required scored83%from 54 tests.

About plugin

  • Plugin page: woo-phone-number-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 27, 2018
  • Latest release: Jul 3, 2018
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: pixeltoweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,726 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.68ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Phone Number Required
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.46 ▼4.11
Dashboard /wp-admin3.31 ▲0.0145.33 ▼4.77
Posts /wp-admin/edit.php3.36 ▲0.0144.23 ▲0.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.07 ▼17.05
Media Library /wp-admin/upload.php3.23 ▲0.0034.73 ▼0.78

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Phone Number Required
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.181.78 ▲0.2144.26 ▲4.84
Dashboard /wp-admin2,198 ▲245.62 ▼0.0693.37 ▲2.7041.06 ▼2.65
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0234.28 ▼2.3335.75 ▼0.15
Add New Post /wp-admin/post-new.php1,526 ▼022.93 ▼0.51632.69 ▼41.4952.50 ▼2.26
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.08103.54 ▼10.5944.31 ▼2.42

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-phone-number-required/woocommerce-phone-number-required.php:12

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

woo-phone-number-required/woocommerce-phone-number-required.php 85% from 13 tests

The entry point to "WooCommerce Phone Number Required" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-phone-number-required.php" instead of "woocommerce-phone-number-required.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP101012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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