90% rwit-phone-formatter

Code Review | RWIT Phone Formatter

WordPress plugin RWIT Phone Formatter scored90%from 54 tests.

About plugin

  • Plugin page: rwit-phone-formatter
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 22, 2021
  • Latest release: Apr 22, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: rwitapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼0.75ms] Passed 4 tests

This is a short check of server-side resources used by RWIT Phone Formatter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.96 ▲1.52
Dashboard /wp-admin3.50 ▲0.2046.27 ▼4.64
Posts /wp-admin/edit.php3.62 ▲0.2650.48 ▲7.12
Add New Post /wp-admin/post-new.php6.08 ▲0.2089.79 ▼7.00
Media Library /wp-admin/upload.php3.43 ▲0.2041.85 ▲7.81

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for RWIT Phone Formatter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲16714.22 ▼0.0216.49 ▲14.5743.78 ▼1.09
Dashboard /wp-admin2,222 ▲314.85 ▼0.22105.58 ▼2.4340.57 ▼2.41
Posts /wp-admin/edit.php2,102 ▲132.05 ▲0.0134.25 ▼4.2935.70 ▲1.65
Add New Post /wp-admin/post-new.php1,533 ▲1923.44 ▲5.54666.61 ▼37.8256.74 ▼5.22
Media Library /wp-admin/upload.php1,407 ▲194.15 ▼0.0594.78 ▼9.6140.56 ▼3.88

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: phone formatter, contact form 7, contact form, phone validator, cf7...

rwit-phone-formatter/rwit-phone-formatter.php Passed 13 tests

This is the main PHP file of "RWIT Phone Formatter" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
53 characters long description:
Formats and validates phone number based on a country

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,794 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP864471,288
JavaScript4144196323
CSS2211183

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/copy.png1.47KB0.49KB▼ 66.64%