84% contact360

Code Review | Contact360

WordPress plugin Contact360 scored 84% from 54 tests.

About plugin

  • Plugin page: contact360
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0
  • WordPress version: 6.3.1
  • First release: Mar 20, 2019
  • Latest release: Jul 31, 2020
  • Number of updates: 11
  • Update frequency: every 45.5 days
  • Top authors: contact360 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 676 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Contact360
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.48 ▼8.27
Dashboard /wp-admin3.31 ▲0.0146.10 ▲2.52
Posts /wp-admin/edit.php3.37 ▲0.0148.13 ▲0.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.79 ▼15.71
Media Library /wp-admin/upload.php3.24 ▲0.0135.12 ▲4.43
Contact360 /wp-admin/options-general.php?page=contact360-settings3.2331.02

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Contact360
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲7814.80 ▲0.511.81 ▼0.3339.15 ▼10.86
Dashboard /wp-admin2,216 ▲315.86 ▲0.04104.07 ▲2.0240.40 ▼3.88
Posts /wp-admin/edit.php2,101 ▲92.05 ▲0.0339.91 ▲0.2836.37 ▼0.92
Add New Post /wp-admin/post-new.php1,526 ▲1217.73 ▲0.02679.13 ▲77.2356.63 ▼0.80
Media Library /wp-admin/upload.php1,401 ▲134.19 ▼0.0198.68 ▼3.0650.34 ▲5.25
Contact360 /wp-admin/options-general.php?page=contact360-settings8252.0224.2325.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% 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 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact360/admin/index.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/contact360/views/admin.settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact360/admin/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
1 plugin tags: contact360

contact360/index.php 92% from 13 tests

The entry point to "Contact360" version 1.3.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contact360.php" instead of "index.php")

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
No dangerous file extensions were detected796 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13140208631
Markdown216095
JSON20070

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.25
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1021.74%
▷ Public methods4291.30%
▷ Protected methods00.00%
▷ Private methods48.70%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin