78% pretty-contact

Code Review | Pretty Contact

WordPress plugin Pretty Contact scored 78% from 54 tests.

About plugin

  • Plugin page: pretty-contact
  • Plugin version: 0.1a...
  • PHP version: 7.4.16
  • WordPress compatibility: 1.2.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 11, 2013
  • Latest release: May 11, 2013
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: GreenBanan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 642 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.25ms] Passed 4 tests

An overview of server-side resources used by Pretty Contact
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.81 ▲0.82
Dashboard /wp-admin3.31 ▲0.0146.28 ▼0.49
Posts /wp-admin/edit.php3.36 ▲0.0148.20 ▲6.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.27 ▼10.68
Media Library /wp-admin/upload.php3.24 ▲0.0133.69 ▼2.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Pretty Contact
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.28 ▼1.391.59 ▼0.1042.74 ▲3.81
Dashboard /wp-admin2,213 ▲224.83 ▼0.0598.38 ▼19.6739.35 ▼6.09
Posts /wp-admin/edit.php2,096 ▲42.02 ▲0.0238.51 ▲1.0034.55 ▲3.89
Add New Post /wp-admin/post-new.php1,549 ▲2023.19 ▲4.62627.46 ▼34.2755.95 ▼3.97
Media Library /wp-admin/upload.php1,386 ▼24.14 ▼0.0598.39 ▼5.0943.00 ▼3.06
Pretty Contact /wp-admin/pretty_contact.php260.440.1314.41

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 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pretty-contact/pretty_contact.php:75

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/pretty_contact.php
    • > Network (severe)
    wp-admin/pretty_contact.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: post, link

pretty-contact/pretty_contact.php 85% from 13 tests

The main PHP file in "Pretty Contact" ver. 0.1a... adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pretty-contact.php" instead of "pretty_contact.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "0.1a...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP182247
JSON10016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
14 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/vk.png0.64KB0.71KB0.00%
icons/myspace.png0.37KB0.41KB0.00%
icons/youtube.png0.54KB0.60KB0.00%
icons/lastfm.png0.73KB0.82KB0.00%
icons/dribbble.png0.89KB0.96KB0.00%