89% widget-contact-now

Code Review | Widget Contact Now

WordPress plugin Widget Contact Now scored89%from 54 tests.

About plugin

  • Plugin page: widget-contact-now
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: May 18, 2019
  • Number of updates: 8
  • Update frequency: every 71.1 days
  • Top authors: longvietweb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.21ms] Passed 4 tests

This is a short check of server-side resources used by Widget Contact Now
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.93 ▼3.62
Dashboard /wp-admin3.37 ▲0.0752.99 ▼1.31
Posts /wp-admin/edit.php3.42 ▲0.0650.16 ▼3.34
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.04 ▼7.54
Media Library /wp-admin/upload.php3.29 ▲0.0635.94 ▼2.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_contacts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Widget Contact Now
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.36 ▲0.011.88 ▲0.0345.87 ▲1.46
Dashboard /wp-admin2,208 ▲305.58 ▼0.0788.77 ▼29.3340.23 ▼4.05
Posts /wp-admin/edit.php2,110 ▲72.03 ▲0.0237.23 ▲0.1433.42 ▼5.36
Add New Post /wp-admin/post-new.php1,536 ▼1223.12 ▼0.14683.61 ▲76.0454.32 ▲3.56
Media Library /wp-admin/upload.php1,410 ▲104.20 ▼0.06110.00 ▲13.2348.55 ▲4.44

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_contacts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: contact information, widget contact now, contact widget, contact, widget contact...

widget-contact-now/widget-contacts-now.php 85% from 13 tests

The main file in "Widget Contact Now" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("widget-contact-now.php" instead of "widget-contacts-now.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected245 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14055211
CSS14434

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 compressed PNG files occupy 0.12MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png60.03KB61.04KB0.00%
screenshot-2.png60.11KB60.68KB0.00%