89% international-phone-number-format

Code Review | International Phone Number Format

WordPress plugin International Phone Number Format scored89%from 54 tests.

About plugin

  • Plugin page: international-pho...
  • Plugin version: 1.0.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2023
  • Latest release: Nov 25, 2023
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: endisha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /12 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by International Phone Number Format
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.90 ▼0.94
Dashboard /wp-admin3.31 ▼0.0446.18 ▼10.25
Posts /wp-admin/edit.php3.36 ▲0.0046.41 ▲0.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.84 ▼19.83
Media Library /wp-admin/upload.php3.23 ▲0.0034.46 ▼1.79

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for International Phone Number Format
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.27 ▼0.071.73 ▲0.0237.33 ▼6.21
Dashboard /wp-admin2,195 ▲185.60 ▲0.0790.10 ▼8.8938.26 ▼6.79
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0539.28 ▼2.9438.23 ▼4.05
Add New Post /wp-admin/post-new.php1,526 ▼1023.62 ▲0.55589.54 ▼19.2947.23 ▼18.62
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0299.68 ▲0.3843.15 ▼2.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: wordpress, phone, mask, number, format...

international-phone-number-format/intl-phone-number-format.php 85% from 13 tests

The primary PHP file in "International Phone Number Format" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("international-phone-number-format.php" instead of "intl-phone-number-format.php")

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
Success! There were no dangerous files found in this plugin8,489 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4121476,059
CSS42701,375
PHP17160199924
PO File14546131

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.17
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods60
▷ Static methods711.67%
▷ Public methods4371.67%
▷ Protected methods1728.33%
▷ Private methods00.00%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants14
▷ Global constants14100.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
3 PNG files occupy 0.33MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/flags@2x.png170.28KB68.04KB▼ 60.04%
assets/img/e164.png99.08KB36.89KB▼ 62.77%
assets/img/flags.png69.20KB23.42KB▼ 66.16%