84% simple-contact-widget

Code Review | Simple Contact Widget

WordPress plugin Simple Contact Widget scored84%from 54 tests.

About plugin

  • Plugin page: simple-contact-wi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2016
  • Latest release: Oct 27, 2016
  • Number of updates: 16
  • Update frequency: every 90.2 days
  • Top authors: purvabathe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,231 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.88ms] Passed 4 tests

Server-side resources used by Simple Contact Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0345.83 ▲3.38
Dashboard /wp-admin3.34 ▲0.0354.24 ▼3.07
Posts /wp-admin/edit.php3.39 ▲0.0355.92 ▲1.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.04 ▼12.84
Media Library /wp-admin/upload.php3.26 ▲0.0340.30 ▲10.24

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_scw_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Contact Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.38 ▲0.022.20 ▲0.5547.12 ▲6.47
Dashboard /wp-admin2,195 ▲215.67 ▲0.0791.53 ▼9.0040.34 ▼3.91
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.1038.77 ▲0.5236.66 ▼0.34
Add New Post /wp-admin/post-new.php1,545 ▲523.15 ▲0.09664.56 ▲50.1057.11 ▲3.87
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.04121.54 ▲24.5851.01 ▲8.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_scw_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 plugins_url() in wp-content/plugins/simple-contact-widget/widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: map widget, purva bathe, contact widget, simple contact widget

simple-contact-widget/widget.php 92% from 13 tests

The entry point to "Simple Contact Widget" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-contact-widget.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected139 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13213139

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/email.png0.37KB0.46KB0.00%
images/phone.png0.37KB0.51KB0.00%
images/marker.png24.01KB10.13KB▼ 57.81%
images/fax.png0.72KB0.91KB0.00%