84% trs-address-book

Code Review | TRS Address Book

WordPress plugin TRS Address Book scored84%from 54 tests.

About plugin

  • Plugin page: trs-address-book
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 21, 2022
  • Latest release: Apr 26, 2022
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: therightsw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /231 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.10MB] [CPU: ▼5.07ms] Passed 4 tests

Server-side resources used by TRS Address Book
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.74 ▼6.34
Dashboard /wp-admin3.41 ▲0.0753.13 ▼11.17
Posts /wp-admin/edit.php3.53 ▲0.1750.44 ▼3.55
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.79 ▲0.77
Media Library /wp-admin/upload.php3.34 ▲0.1138.36 ▲3.37

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TRS Address Book
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲18913.62 ▼0.5411.91 ▲9.9643.69 ▼0.55
Dashboard /wp-admin2,225 ▲225.76 ▼0.26101.87 ▼10.1940.75 ▼3.11
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0135.65 ▼8.1235.24 ▼4.16
Add New Post /wp-admin/post-new.php1,380 ▼16516.61 ▼6.49590.22 ▼79.6253.76 ▼1.51
Media Library /wp-admin/upload.php1,404 ▲44.15 ▼0.0696.59 ▼11.6340.38 ▼8.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/trs-address-book/function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/trs-address-book/admin/admin_field.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: multiple addresses, shipping-address, checkout, my-account, woocommerce...

trs-address-book/trs-address-book.php 92% from 13 tests

The primary PHP file in "TRS Address Book" version 1.0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,024 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP1113660903
JavaScript201117
CSS1004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected