84% the-tweet-button

Code Review | The Tweet Button - Simple Sharing

WordPress plugin The Tweet Button - Simple Sharing scored 84% from 54 tests.

About plugin

  • Plugin page: the-tweet-button
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2017
  • Latest release: Jul 27, 2019
  • Number of updates: 7
  • Update frequency: every 120.3 days
  • Top authors: benshadle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.20ms] Passed 4 tests

Server-side resources used by The Tweet Button - Simple Sharing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.63 ▲4.84
Dashboard /wp-admin3.35 ▲0.0554.73 ▲1.43
Posts /wp-admin/edit.php3.47 ▲0.1158.28 ▲7.91
Add New Post /wp-admin/post-new.php5.95 ▲0.0792.35 ▼24.88
Media Library /wp-admin/upload.php3.28 ▲0.0540.77 ▲5.80

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by The Tweet Button - Simple Sharing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲13614.74 ▲1.5232.22 ▲30.1046.93 ▲5.85
Dashboard /wp-admin2,213 ▲134.84 ▼0.95104.26 ▲5.9141.87 ▲1.75
Posts /wp-admin/edit.php2,090 ▲42.00 ▼0.0134.98 ▼0.8033.06 ▼0.53
Add New Post /wp-admin/post-new.php1,518 ▼1823.15 ▲0.10662.56 ▲63.3053.06 ▲3.18
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0699.46 ▼8.5642.23 ▼3.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/the-tweet-button/public/partials/tweet-button-public-display.php
    • > /wp-content/plugins/the-tweet-button/admin/partials/tweet-button-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

the-tweet-button/tweet-button.php 92% from 13 tests

Analyzing the main PHP file in "The Tweet Button - Simple Sharing" version 1.0.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("the-tweet-button.php" instead of "tweet-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin197 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12116536177
JavaScript365420
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity1.29
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin