84% cf7-israeli-phone-validation

Code Review | CF7 Israeli Phone Validation

WordPress plugin CF7 Israeli Phone Validation scored84%from 54 tests.

About plugin

  • Plugin page: cf7-israeli-phone...
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Feb 21, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: itailulu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /974 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.86ms] Passed 4 tests

This is a short check of server-side resources used by CF7 Israeli Phone Validation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.81 ▼5.94
Dashboard /wp-admin3.31 ▲0.0145.20 ▼5.51
Posts /wp-admin/edit.php3.36 ▲0.0048.55 ▲2.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.61 ▲3.43
Media Library /wp-admin/upload.php3.23 ▲0.0033.39 ▼2.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for CF7 Israeli Phone Validation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.174.50 ▲2.2240.65 ▼3.74
Dashboard /wp-admin2,209 ▲215.88 ▲1.00112.90 ▲6.7344.12 ▲4.67
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0238.52 ▼4.0833.93 ▲0.48
Add New Post /wp-admin/post-new.php1,529 ▼418.63 ▼4.50593.20 ▼80.4156.00 ▲0.16
Media Library /wp-admin/upload.php1,385 ▲34.28 ▲0.09100.36 ▼8.2441.53 ▼4.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cf7-israeli-phone-validation/cf7-israel-phone-validation.php:48

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

cf7-israeli-phone-validation/cf7-israel-phone-validation.php 92% from 13 tests

The entry point to "CF7 Israeli Phone Validation" version 0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-israeli-phone-validation.php" instead of "cf7-israel-phone-validation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112315

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.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