84% fr-address-book-for-woocommerce

Code Review | Fr Address Book For Woocommerce

WordPress plugin Fr Address Book For Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: fr-address-book-f...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2018
  • Latest release: Jul 23, 2023
  • Number of updates: 25
  • Update frequency: every 70.6 days
  • Top authors: fahrirusliyadi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,344 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.09MB] [CPU: ▼1.87ms] Passed 4 tests

Analyzing server-side resources used by Fr Address Book For Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.58 ▼2.72
Dashboard /wp-admin3.38 ▲0.0843.90 ▼4.85
Posts /wp-admin/edit.php3.49 ▲0.1445.66 ▼0.45
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.43 ▲1.52
Media Library /wp-admin/upload.php3.30 ▲0.0733.24 ▲0.53

Server storage [IO: ▲0.09MB] [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: 34 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fr Address Book For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.161.65 ▼0.0639.53 ▼4.48
Dashboard /wp-admin2,206 ▲154.87 ▼0.01106.30 ▼0.1238.68 ▼5.89
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0132.80 ▼3.9435.36 ▼2.20
Add New Post /wp-admin/post-new.php1,534 ▲1523.16 ▲0.33620.76 ▼23.0753.86 ▼1.25
Media Library /wp-admin/upload.php1,382 ▼64.22 ▲0.0099.13 ▼4.2740.41 ▼3.62

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

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

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)
Even though no errors were found, this is by no means 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
Please fix the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBook_BaseAction' not found in wp-content/plugins/fr-address-book-for-woocommerce/src/Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBookEdit_Action.php:9
    • > PHP Notice
      Undefined variable: addresses in wp-content/plugins/fr-address-book-for-woocommerce/templates/select-address.php on line 22
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/fr-address-book-for-woocommerce/templates/select-address.php on line 22
    • > PHP Notice
      Undefined variable: addresses in wp-content/plugins/fr-address-book-for-woocommerce/templates/select-address.php on line 30
    • > PHP Fatal error
      Uncaught Error: Class 'Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBook_BaseAction' not found in wp-content/plugins/fr-address-book-for-woocommerce/src/Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBookAdd_Action.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_BaseEndpoint' not found in wp-content/plugins/fr-address-book-for-woocommerce/src/Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBookAdd.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fr_address_book_for_woocommerce() in wp-content/plugins/fr-address-book-for-woocommerce/templates/select-address.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_BaseEndpoint' not found in wp-content/plugins/fr-address-book-for-woocommerce/src/Fr_Address_Book_for_WooCommerce_Frontend_MyAccount_AddressBookEdit.php:9
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/fr-address-book-for-woocommerce/templates/select-address.php on line 30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

fr-address-book-for-woocommerce/fr-address-book-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "Fr Address Book For Woocommerce" version 1.2.6
90 characters long description:
Allow customers to save multiple addresses that they frequently use when placing an order.

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
Everything looks great! No dangerous files found in this plugin1,008 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP24211846793
JavaScript2298088
PO File1293180
CSS212147

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes210.53%
▷ Concrete classes1789.47%
▷ Final classes00.00%
Methods79
▷ Static methods22.53%
▷ Public methods4860.76%
▷ Protected methods1215.19%
▷ Private methods1924.05%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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 are no PNG files in this plugin