78% crowd

Code Review | TalkToMe - user inputs & polls

WordPress plugin TalkToMe - user inputs & polls scored78%from 54 tests.

About plugin

  • Plugin page: crowd
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: May 12, 2017
  • Latest release: Jul 31, 2017
  • Number of updates: 31
  • Update frequency: every 2.6 days
  • Top authors: tageswoche (58.06%)EdwardBock (45.16%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /999 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.35MB] [CPU: ▼8.52ms] Passed 4 tests

An overview of server-side resources used by TalkToMe - user inputs & polls
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4139.10 ▼1.22
Dashboard /wp-admin3.69 ▲0.3545.70 ▼19.55
Posts /wp-admin/edit.php3.75 ▲0.3949.16 ▲6.87
Add New Post /wp-admin/post-new.php6.23 ▲0.3493.00 ▼17.06
Media Library /wp-admin/upload.php3.55 ▲0.3235.72 ▲3.75
Settings /wp-admin/admin.php?page=crowd_settings3.5132.61
Cards /wp-admin/edit.php?post_type=card3.6637.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for TalkToMe - user inputs & polls
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.23 ▼1.161.69 ▼0.0442.07 ▼1.33
Dashboard /wp-admin2,249 ▲614.86 ▲0.0499.82 ▼16.5937.36 ▼8.06
Posts /wp-admin/edit.php2,129 ▲402.01 ▼0.0340.34 ▲0.2535.01 ▼0.48
Add New Post /wp-admin/post-new.php6,306 ▲4,78418.72 ▼4.70897.70 ▲303.5057.81 ▲2.47
Media Library /wp-admin/upload.php1,431 ▲404.20 ▲0.05100.23 ▲2.6942.47 ▲1.07
Settings /wp-admin/admin.php?page=crowd_settings8072.1626.3123.98
Cards /wp-admin/edit.php?post_type=card1,1662.0030.3430.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/crowd/templates/initiator.tpl.php
    • > /wp-content/plugins/crowd/templates/cards.tpl.php
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/crowd/templates/card-htmlcard.tpl.php:7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/crowd/templates/cards.tpl.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crowd/templates/embed.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Crowd\\BaseCard' not found in wp-content/plugins/crowd/inc/card/html-card.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Crowd\\BaseCard' not found in wp-content/plugins/crowd/inc/card/poll-card.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/crowd/templates/card-pollcard.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/crowd/grid/templates/grid-box-crowd_cards.tpl.php:9
    • > PHP Notice
      Undefined variable: initiator in wp-content/plugins/crowd/templates/initiator.tpl.php on line 7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/crowd/templates/card-inputcard.tpl.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/crowd/inc/card-query.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: community

crowd/plugin.php 92% from 13 tests

The main PHP script in "TalkToMe - user inputs & polls" version 1.0.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crowd.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,886 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP324649161,433
JavaScript468100254
PO File15051134
CSS22157
Pascal15138

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.30
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods115
▷ Static methods43.48%
▷ Public methods10994.78%
▷ Protected methods00.00%
▷ Private methods65.22%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants52
▷ Global constants00.00%
▷ Class constants52100.00%
▷ Public constants52100.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 were not PNG files found in your plugin