83% contact-block

Code Review | CF block

WordPress plugin CF block scored83%from 54 tests.

About plugin

  • Plugin page: contact-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9.3
  • WordPress version: 6.3.1
  • First release: May 6, 2022
  • Latest release: May 6, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: rajanpanchal2028 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,012 total downloads


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
Installer ran successfully

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

An overview of server-side resources used by CF block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.37 ▼0.82
Dashboard /wp-admin3.31 ▼0.0451.28 ▼12.82
Posts /wp-admin/edit.php3.36 ▲0.0050.88 ▲2.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.46 ▲8.80
Media Library /wp-admin/upload.php3.23 ▲0.0036.12 ▲1.83

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for CF block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.372.79 ▲1.1647.98 ▲7.53
Dashboard /wp-admin2,195 ▲155.54 ▼0.1282.17 ▼10.3236.60 ▼9.99
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0138.98 ▼0.1436.15 ▼1.19
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▼0.12639.30 ▲18.0669.62 ▲21.39
Media Library /wp-admin/upload.php1,397 ▼34.43 ▲0.2598.73 ▼7.9945.75 ▲0.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/contact-block/cf-gutenberg-block.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots require images: #1 (`/assets/Screenshot-1.png`), #2 (`/assets/Screenshot-3.png`)
You can look at the official readme.txt

contact-block/cf-gutenberg-block.php 92% from 13 tests

The principal PHP file in "CF block" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contact-block.php" instead of "cf-gutenberg-block.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
Success! There were no dangerous files found in this plugin1,177 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions233.33%
▷ Anonymous functions466.67%
▷ Global constants00.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
3 PNG files occupy 0.38MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot-1.png209.68KB75.27KB▼ 64.10%
assets/Screenshot-2.png159.77KB50.79KB▼ 68.21%
assets/Screenshot-3.png23.81KB6.31KB▼ 73.50%