74% contact-page

Code Review | Contact Page

WordPress plugin Contact Page scored74%from 54 tests.

About plugin

  • Plugin page: contact-page
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Nov 11, 2012
  • Latest release: Dec 11, 2012
  • Number of updates: 5
  • Update frequency: every 6.0 days
  • Top authors: marekbosman (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /14,571 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼3.79ms] Passed 4 tests

Server-side resources used by Contact Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.27 ▼3.46
Dashboard /wp-admin3.34 ▼0.0149.81 ▼15.74
Posts /wp-admin/edit.php3.39 ▲0.0349.95 ▼0.36
Add New Post /wp-admin/post-new.php5.92 ▲0.03111.97 ▲19.13
Media Library /wp-admin/upload.php3.26 ▲0.0342.65 ▲4.42
Contact Page /wp-admin/options-general.php?page=contact-page3.2234.20

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Contact Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.30 ▼1.101.83 ▲0.1143.16 ▼3.79
Dashboard /wp-admin2,228 ▲254.89 ▼0.0199.47 ▼29.3137.96 ▼18.38
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0139.89 ▲0.8638.80 ▲2.77
Add New Post /wp-admin/post-new.php1,529 ▼1717.71 ▼5.38623.43 ▼17.1254.35 ▼7.11
Media Library /wp-admin/upload.php1,404 ▲74.21 ▼0.00116.76 ▲10.0252.37 ▲0.05
Contact Page /wp-admin/options-general.php?page=contact-page1,0412.1826.5434.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function unregister_setting was called with an argument that is deprecated since version 4.7.0! $sanitize_callback is deprecated. The callback from register_setting() is used instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-page/contact-page.php:48

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (The page that is generated by the plugin)
The official readme.txt is a good inspiration

contact-page/contact-page.php Passed 13 tests

This is the main PHP file of "Contact Page" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
140 characters long description:
Easily create a contact page with relevant address information, Google Maps, your latest tweets and links to relevant social media profiles.

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
Success! There were no dangerous files found in this plugin442 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16575374
CSS1191268

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
131 PNG files occupy 0.53MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/social-media/16/steam.png0.63KB0.52KB▼ 17.86%
screenshot-2.png254.17KB88.87KB▼ 65.04%
assets/images/social-media/32/twitter.png0.94KB0.97KB0.00%
assets/images/social-media/32/bebo.png0.97KB0.99KB0.00%
assets/images/social-media/16/friendfeed.png0.69KB0.73KB0.00%