83% contact

Code Review | Contact Details

WordPress plugin Contact Details scored83%from 54 tests.

About plugin

  • Plugin page: contact
  • Plugin version: 0.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 6.3.1
  • First release: Dec 6, 2009
  • Latest release: Oct 9, 2014
  • Number of updates: 52
  • Update frequency: every 34.1 days
  • Top authors: 36flavours (59.62%)stvwhtly (42.31%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /111,528 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.59ms] Passed 4 tests

This is a short check of server-side resources used by Contact Details
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0544.99 ▼4.41
Dashboard /wp-admin3.36 ▲0.0652.33 ▼8.18
Posts /wp-admin/edit.php3.41 ▲0.0554.64 ▲1.25
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.74 ▼19.00
Media Library /wp-admin/upload.php3.28 ▲0.0538.53 ▲3.68
Contact Details /wp-admin/options-general.php?page=contact3.2534.85

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
contact
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Details
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.18 ▼0.081.67 ▼0.1543.04 ▼1.11
Dashboard /wp-admin2,196 ▲165.50 ▼0.1381.05 ▼7.5040.64 ▲1.70
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0041.88 ▲4.7037.29 ▼2.41
Add New Post /wp-admin/post-new.php1,531 ▲322.86 ▼0.25604.64 ▼125.7156.77 ▼14.04
Media Library /wp-admin/upload.php1,404 ▲14.25 ▲0.1196.75 ▼11.1541.39 ▼1.04
Contact Details /wp-admin/options-general.php?page=contact8812.0222.6526.96

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • contact
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/contact/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact/index.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/contact/form.php:2

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (The contact details management page.) image not found
Please take inspiration from this readme.txt

contact/index.php 92% from 13 tests

The main PHP script in "Contact Details" version 0.8.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected498 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP319370
PO File24040128

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.15KB7.16KB▼ 49.41%