84% rich-contact-widget

Code Review | Rich Contact Widget

WordPress plugin Rich Contact Widget scored 84% from 54 tests.

About plugin

  • Plugin page: rich-contact-widget
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.8
  • WordPress version: 6.3.1
  • First release: Jun 25, 2012
  • Latest release: Jun 11, 2017
  • Number of updates: 90
  • Update frequency: every 20.1 days
  • Top authors: tabrisrp (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

5,000+ active / 81,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.24ms] Passed 4 tests

Server-side resources used by Rich Contact Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.39 ▼4.26
Dashboard /wp-admin3.40 ▲0.1043.48 ▼4.05
Posts /wp-admin/edit.php3.45 ▲0.1047.77 ▲1.61
Add New Post /wp-admin/post-new.php5.98 ▲0.1082.16 ▼14.70
Media Library /wp-admin/upload.php3.32 ▲0.0934.70 ▼1.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rich Contact Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.404.07 ▲2.1937.15 ▼12.09
Dashboard /wp-admin2,206 ▲154.85 ▼0.08113.05 ▲10.4646.91 ▲5.59
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0438.06 ▲1.3331.05 ▼3.79
Add New Post /wp-admin/post-new.php1,514 ▼617.51 ▼5.68684.82 ▲67.9255.12 ▼1.75
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.1193.93 ▼23.0641.74 ▼7.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_rc_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rich-contact-widget/rich-contact-widget.php:137

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can take inspiration from this readme.txt

rich-contact-widget/rich-contact-widget.php Passed 13 tests

Analyzing the main PHP file in "Rich Contact Widget" version 1.4.6
68 characters long description:
A simple contact widget enhanced with microdatas & microformats tags

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin500 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13762500

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.33
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions1
▷ Named functions1100.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
There are no PNG files in this plugin