10% any-contact

Code Review | Any Contact

WordPress plugin Any Contact scored10%from 54 tests.

About plugin

  • Plugin page: any-contact
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.9.1
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: May 20, 2014
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: patrick.helbing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /948 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/any-contact/init.php+34
    Undefined variable: _SESSION

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.45ms] Passed 4 tests

This is a short check of server-side resources used by Any Contact
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.35 ▼3.68
Dashboard /wp-admin3.31 ▲0.0047.81 ▲2.68
Posts /wp-admin/edit.php3.36 ▲0.0044.72 ▼6.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.96 ▼3.02
Media Library /wp-admin/upload.php3.23 ▲0.0031.16 ▼5.10

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Any Contact
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.57 ▼0.701.68 ▼0.2842.95 ▼2.63
Dashboard /wp-admin2,209 ▲214.87 ▼0.01103.11 ▼4.3142.53 ▲2.84
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.0334.91 ▼0.7338.14 ▲3.91
Add New Post /wp-admin/post-new.php1,542 ▲918.24 ▼4.79625.49 ▼41.6452.01 ▼9.70
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.1096.33 ▼18.1441.33 ▼7.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/any-contact/captcha.php
    • > /wp-content/plugins/any-contact/init.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      imagettftext(): Could not find/open font in wp-content/plugins/any-contact/captcha.php on line 23
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/any-contact/init.php on line 34
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/any-contact/functions/html.php on line 495
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/any-contact/functions/functions.php on line 82
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/any-contact/captcha.php on line 3
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/any-contact/functions/setup.php on line 54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (screenshot-1.png)
Please take inspiration from this readme.txt

any-contact/init.php 85% from 13 tests

"Any Contact" version 0.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("any-contact.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,243 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP816846809
CSS23198277
JavaScript1252157

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png19.49KB10.41KB▼ 46.60%