78% letstalk

Code Review | letstalk button

WordPress plugin letstalk button scored 78% from 54 tests.

About plugin

  • Plugin page: letstalk
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.2
  • WordPress version: 5.9.2
  • First release: Mar 7, 2017
  • Latest release: Mar 7, 2017
  • Number of updates: 10
  • Update frequency: every 1.2 days
  • Top authors: topishare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 479 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.16MB] [CPU: ▼304.35ms] Passed 4 tests

Server-side resources used by letstalk button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2249.96 ▼2.77
Dashboard /wp-admin3.57 ▲0.1634.02 ▲2.00
Posts /wp-admin/edit.php3.80 ▲0.1638.80 ▲0.12
Add New Post /wp-admin/post-new.php7.10 ▲0.1296.70 ▼1,213.92
Media Library /wp-admin/upload.php3.51 ▲0.2224.80 ▼0.83

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 2 new options
New WordPress options
letstalk-options
letstalk_deferred_admin_notices

Browser metrics Passed 4 tests

An overview of browser requirements for letstalk button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲5916.17 ▲0.496.49 ▼0.443.21 ▲0.81
Dashboard /wp-admin2,907 ▲526.23 ▲0.04114.68 ▼27.80171.00 ▲11.92
Posts /wp-admin/edit.php2,677 ▼143.13 ▼0.1162.93 ▼0.67131.72 ▼7.50
Add New Post /wp-admin/post-new.php1,674 ▼4316.30 ▼5.13393.01 ▼49.33161.33 ▲2.46
Media Library /wp-admin/upload.php1,715 ▲205.53 ▲0.01122.85 ▼20.80208.08 ▲22.18

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
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • letstalk_deferred_admin_notices
    • letstalk-options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/letstalk/trunk/includes/partials/letstalk-display-widget.php
    • > /wp-content/plugins/letstalk/includes/partials/letstalk-display-widget.php
  • 30× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: setatts in wp-content/plugins/letstalk/admin/partials/___letstalk-admin-field-repeater.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/letstalk/admin/partials/letstalk-admin-page-settings.php:16
    • > PHP Notice
      Undefined variable: setatts in wp-content/plugins/letstalk/trunk/admin/partials/___letstalk-admin-field-repeater.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/letstalk/trunk/admin/partials/letstalk-admin-field-textarea.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/letstalk/trunk/admin/partials/___letstalk-admin-field-text.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/letstalk/admin/partials/___letstalk-admin-field-select.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/letstalk/includes/class-letstalk-widget.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_editor() in wp-content/plugins/letstalk/admin/partials/___letstalk-admin-field-editor.php:29
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/letstalk/trunk/admin/partials/___letstalk-admin-field-repeater.php on line 24
    • > PHP Notice
      Undefined variable: count in wp-content/plugins/letstalk/admin/partials/___letstalk-admin-field-repeater.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (topishare Let's talk button), #2 (Installation step 1), #3 (Installation step 2), #4 (Installation step 3), #5 (Installation step 4), #6 (How the Let's talk button works)
You can take inspiration from this readme.txt

letstalk/letstalk.php Passed 13 tests

The principal PHP file in "letstalk button" v. 1.0.0 is loaded by WordPress automatically on each request
90 characters long description:
Add a topishare Let's talk button on your site and create your own customized social space

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
Everything looks great! No dangerous files found in this plugin1,068 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP256001,162840
Sass1270129
JavaScript8655698
CSS2151

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.73
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods148
▷ Static methods1610.81%
▷ Public methods12081.08%
▷ Protected methods21.35%
▷ Private methods2617.57%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.17MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/assets/screenshot-4.png93.60KB41.73KB▼ 55.41%
trunk/assets/screenshot-1.png22.83KB9.16KB▼ 59.88%
trunk/assets/icon-128x128.png6.17KB3.14KB▼ 49.11%
admin/images/topishare_logo.png0.62KB0.73KB0.00%
trunk/admin/images/topishare_logo.png0.62KB0.73KB0.00%