84% click-to-tweeet-block

Code Review | Click To Tweet Block

WordPress plugin Click To Tweet Block scored 84% from 54 tests.

About plugin

  • Plugin page: click-to-tweeet-b...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.8.0
  • WordPress version: 6.3.1
  • First release: Oct 8, 2020
  • Latest release: Aug 3, 2021
  • Number of updates: 8
  • Update frequency: every 37.5 days
  • Top authors: ibachal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,376 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Click To Tweet Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.60 ▼0.80
Dashboard /wp-admin3.32 ▲0.0146.07 ▼3.10
Posts /wp-admin/edit.php3.37 ▲0.0148.72 ▼1.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.50 ▼7.93
Media Library /wp-admin/upload.php3.24 ▲0.0137.79 ▲2.99

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Click To Tweet Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.21 ▼1.031.68 ▼0.7142.30 ▼4.16
Dashboard /wp-admin2,206 ▲155.83 ▲0.9699.25 ▼1.7039.73 ▼0.14
Posts /wp-admin/edit.php2,092 ▲62.02 ▲0.0138.87 ▲0.8334.95 ▲4.40
Add New Post /wp-admin/post-new.php6,587 ▲5,05429.47 ▲6.24992.80 ▲312.4566.83 ▼2.10
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.11108.65 ▼0.0447.14 ▼0.92

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× 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/click-to-tweeet-block/click-to-tweet.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: block, twitter, social share, quote, tweet block

click-to-tweeet-block/click-to-tweet.php 85% from 13 tests

The main PHP script in "Click To Tweet Block" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("click-to-tweeet-block.php" instead of "click-to-tweet.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected57 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP251640
JSON10014
CSS2202
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions1
▷ Named functions1100.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 were not PNG files found in your plugin