78% byteplant-phone-validator

Code Review | Byteplant Phone Validator

WordPress plugin Byteplant Phone Validator scored78%from 54 tests.

About plugin

  • Plugin page: byteplant-phone-v...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: May 4, 2023
  • Number of updates: 35
  • Update frequency: every 73.7 days
  • Top authors: byteplant (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,798 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.58ms] Passed 4 tests

Analyzing server-side resources used by Byteplant Phone Validator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.04 ▼3.31
Dashboard /wp-admin3.34 ▼0.0145.39 ▼14.14
Posts /wp-admin/edit.php3.39 ▲0.0349.14 ▲1.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.09 ▼18.60
Media Library /wp-admin/upload.php3.26 ▲0.0339.54 ▲4.63
Byteplant Phone Validator /wp-admin/options-general.php?page=byteplant_phone_validator3.2130.84

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Byteplant Phone Validator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.59 ▼1.031.60 ▼0.0339.72 ▼4.50
Dashboard /wp-admin2,213 ▲225.87 ▼0.03101.53 ▼1.0440.19 ▼4.70
Posts /wp-admin/edit.php2,093 ▲42.13 ▲0.0940.75 ▼5.0437.10 ▲0.81
Add New Post /wp-admin/post-new.php1,546 ▲1318.30 ▼4.87652.03 ▲30.9349.96 ▼3.69
Media Library /wp-admin/upload.php1,386 ▲44.14 ▼0.04103.20 ▲0.5842.74 ▼2.96
Byteplant Phone Validator /wp-admin/options-general.php?page=byteplant_phone_validator2,1712.0623.4129.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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=byteplant_phone_validator
    • > Notice in wp-content/plugins/byteplant-phone-validator/src/class-bppv-admin.php+328
    Undefined variable: key

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/byteplant-phone-validator/plugin.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
10 plugin tags: ninja forms, woocommerce, contact form 7, wp forms, phone validation...

byteplant-phone-validator/plugin.php 85% from 13 tests

The main PHP script in "Byteplant Phone Validator" version 4.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 197 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("byteplant-phone-validator.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,855 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP152958361,067
PO File1275276588
JavaScript4260182
CSS23018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.08
▷ Minimum class complexity2.00
▷ Maximum class complexity15.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods94
▷ Static methods66.38%
▷ Public methods8994.68%
▷ Protected methods33.19%
▷ Private methods22.13%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin