10% simple-contact-info-widget

Code Review | Contact Info Widget

WordPress plugin Contact Info Widget scored10%from 54 tests.

About plugin

  • Plugin page: simple-contact-in...
  • Plugin version: 2.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Sep 17, 2020
  • Number of updates: 103
  • Update frequency: every 14.9 days
  • Top authors: riotweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /46,938 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/simple-contact-info-widget/simple-contact-info-widget.php+253
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.43ms] Passed 4 tests

An overview of server-side resources used by Contact Info Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.76 ▼31.67
Dashboard /wp-admin2.05 ▼1.266.62 ▼38.04
Posts /wp-admin/edit.php2.05 ▼1.316.06 ▼37.89
Add New Post /wp-admin/post-new.php2.05 ▼3.845.72 ▼98.11
Media Library /wp-admin/upload.php2.05 ▼1.184.97 ▼28.98
Contact Info Widget /wp-admin/options-general.php?page=contact-info-widget2.055.96

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_contact_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Contact Info Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.27 ▼1.055.03 ▲3.4037.25 ▼0.79
Dashboard /wp-admin2,210 ▲215.85 ▲0.93113.42 ▼31.3843.02 ▼5.20
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0039.90 ▲0.8336.19 ▲1.36
Add New Post /wp-admin/post-new.php1,536 ▼1023.46 ▲4.94667.57 ▲42.5748.71 ▼2.53
Media Library /wp-admin/upload.php1,395 ▲74.27 ▼0.0395.81 ▼5.8342.18 ▼2.06
Contact Info Widget /wp-admin/options-general.php?page=contact-info-widget8572.1422.3429.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-contact-info-widget/simple-contact-info-widget.php+253
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_contact_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=contact-info-widget
    • > Deprecated in wp-content/plugins/simple-contact-info-widget/simple-contact-info-widget.php+253
    Function create_function() is deprecated

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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-contact-info-widget/simple-contact-info-widget.php
    • > /wp-content/plugins/simple-contact-info-widget/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

simple-contact-info-widget/simple-contact-info-widget.php Passed 13 tests

The primary PHP file in "Contact Info Widget" version 2.6.2 is used by WordPress to initiate all plugin functionality
51 characters long description:
A simple Wordpress widget that shows contact info.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin440 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP25521259
PO File36969180
CSS1171

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png20.58KB9.56KB▼ 53.54%
images/stars.png0.59KB0.45KB▼ 24.13%