78% simple-contact-information-widget

Code Review | Contact Information Widget

WordPress plugin Contact Information Widget scored78%from 54 tests.

About plugin

  • Plugin page: simple-contact-in...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2018
  • Latest release: Apr 5, 2022
  • Number of updates: 11
  • Update frequency: every 135.1 days
  • Top authors: jaydeepchauhan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /4,553 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.09MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by Contact Information Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1038.30 ▲1.60
Dashboard /wp-admin3.40 ▲0.0644.95 ▼13.33
Posts /wp-admin/edit.php3.52 ▲0.1647.40 ▼2.25
Add New Post /wp-admin/post-new.php6.00 ▲0.1188.99 ▼5.88
Media Library /wp-admin/upload.php3.33 ▲0.1037.82 ▲2.91

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

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

Browser metrics Passed 4 tests

Contact Information Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.44 ▼1.128.52 ▲6.8839.53 ▼0.05
Dashboard /wp-admin2,199 ▲185.64 ▼0.0898.22 ▼2.3738.85 ▼4.01
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0139.72 ▼1.6735.16 ▼1.66
Add New Post /wp-admin/post-new.php1,532 ▼323.34 ▲5.01679.51 ▲34.8157.37 ▼4.20
Media Library /wp-admin/upload.php1,401 ▲14.22 ▼0.0694.68 ▼3.5443.86 ▲0.99

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 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_contact_information_widget
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-contact-information-widget/admin/partials/contact-information-admin-display.php
    • > /wp-content/plugins/simple-contact-information-widget/public/partials/contact-information-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-contact-information-widget/includes/contact-information-widget.php:23

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)
Everything seems fine on the user side

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
5 plugin tags: contact-information, contact, widget, contact information, contact-information-widget

simple-contact-information-widget/contact-information.php 85% from 13 tests

The main file in "Contact Information Widget" v. 1.0.3 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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-contact-information-widget.php" instead of "contact-information.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin426 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13165559329
CSS29891
JavaScript24586

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 images were found in this plugin