10% ym-contact-display

Code Review | YM Contact Display

WordPress plugin YM Contact Display scored10%from 54 tests.

About plugin

  • Plugin page: ym-contact-display
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 9, 2014
  • Latest release: Oct 9, 2014
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: youngminds (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,177 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
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/ym-contact-display/ym-contact-display.php+142
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼62.21ms] Passed 4 tests

This is a short check of server-side resources used by YM Contact Display
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.83 ▼39.82
Dashboard /wp-admin2.11 ▼1.246.12 ▼62.20
Posts /wp-admin/edit.php2.11 ▼1.254.99 ▼46.71
Add New Post /wp-admin/post-new.php2.11 ▼3.786.75 ▼100.09
Media Library /wp-admin/upload.php2.11 ▼1.126.75 ▼32.46

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/ym-contact-display/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_ym_contact_display
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by YM Contact Display
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.24 ▼1.121.66 ▼0.4043.88 ▼2.22
Dashboard /wp-admin2,215 ▲125.84 ▼0.02103.86 ▼10.8839.59 ▼3.64
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0034.13 ▼4.6132.24 ▼0.50
Add New Post /wp-admin/post-new.php1,549 ▲2323.16 ▲5.35665.70 ▼42.0773.67 ▲23.36
Media Library /wp-admin/upload.php1,400 ▼04.23 ▼0.0396.28 ▼23.7843.82 ▼3.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/ym-contact-display/ym-contact-display.php+142
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_ym_contact_display

Smoke tests 75% 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 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ym-contact-display/ym-contact-display.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: contact display, contact, address display, address, contact address

ym-contact-display/ym-contact-display.php Passed 13 tests

This is the main PHP file of "YM Contact Display" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
Add contact display widget to show company name, address, phone, email etc

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin123 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11110123

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity7.25
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin