78% contact-info

Code Review | Contact Info

WordPress plugin Contact Info scored78%from 54 tests.

About plugin

  • Plugin page: contact-info
  • Plugin version: 3.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Sep 29, 2011
  • Latest release: May 14, 2022
  • Number of updates: 40
  • Update frequency: every 97.2 days
  • Top authors: avi.megladon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /10,066 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.00ms] Passed 4 tests

A check of server-side resources used by Contact Info
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.03 ▼2.77
Dashboard /wp-admin3.32 ▲0.0253.63 ▲3.64
Posts /wp-admin/edit.php3.38 ▲0.0248.43 ▼3.09
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.69 ▼15.61
Media Library /wp-admin/upload.php3.25 ▲0.0237.02 ▼2.51
Contact Info /wp-admin/options-general.php?page=contact_info_afo3.2640.11

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Info
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲6214.41 ▼0.262.15 ▲0.1545.42 ▲5.54
Dashboard /wp-admin2,206 ▲265.62 ▼0.0785.87 ▼4.6239.08 ▼9.05
Posts /wp-admin/edit.php2,111 ▲112.04 ▼0.1335.23 ▼1.8733.24 ▼4.06
Add New Post /wp-admin/post-new.php1,540 ▼523.09 ▼0.12636.84 ▼46.7234.18 ▼28.92
Media Library /wp-admin/upload.php1,417 ▲204.26 ▲0.02100.21 ▼15.5747.94 ▼1.99
Contact Info /wp-admin/options-general.php?page=contact_info_afo2,7912.2126.9132.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_contact_info_wid
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/contact-info/view/frontend/widget.php
    • > /wp-content/plugins/contact-info/view/admin/help.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/contact-info/view/admin/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contact-info/contact-info-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/contact-info/contact-info-widget.php:3
    • > PHP Notice
      Undefined variable: contact_info_data in wp-content/plugins/contact-info/view/admin/help.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/contact-info/view/admin/help-support.php:3
    • > PHP Notice
      Undefined variable: contact_info_data in wp-content/plugins/contact-info/view/frontend/widget.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can look at the official readme.txt

contact-info/contact-info.php 92% from 13 tests

The principal PHP file in "Contact Info" v. 3.1.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

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
Good job! No executable or dangerous file extensions detected464 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP114720350
JavaScript22152
CSS14450
PO File15012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants2
▷ Global constants2100.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rss.png0.60KB0.50KB▼ 16.18%
images/paypal.png0.77KB0.80KB0.00%