78% awesome-click-to-tweet

Code Review | Awesome Click To Tweet

WordPress plugin Awesome Click To Tweet scored 78% from 54 tests.

About plugin

  • Plugin page: awesome-click-to-...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9
  • WordPress version: 5.8.1
  • First release: Sep 5, 2016
  • Latest release: May 31, 2018
  • Number of updates: 20
  • Update frequency: every 31.7 days
  • Top authors: Uriahs Victor (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active / 2,050 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Awesome Click To Tweet
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1840.85 ▲15.44
Dashboard /wp-admin3.12 ▲0.0645.93 ▼1.54
Posts /wp-admin/edit.php3.21 ▲0.0949.43 ▲6.29
Add New Post /wp-admin/post-new.php5.48 ▲0.0594.69 ▼562.13
Media Library /wp-admin/upload.php3.06 ▲0.0531.17 ▼7.78

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 1 new option
New WordPress options
tld_actt_activation_date

Browser metrics Passed 4 tests

A check of browser resources used by Awesome Click To Tweet
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12716.21 ▲0.607.03 ▼1.3953.14 ▲6.45
Dashboard /wp-admin2,975 ▲415.85 ▼0.09142.26 ▼1.16120.22 ▼6.17
Posts /wp-admin/edit.php2,741 ▲22.69 ▲0.0172.52 ▲1.5194.24 ▼0.19
Add New Post /wp-admin/post-new.php1,526 ▼15718.89 ▲0.46403.49 ▲4.86127.12 ▲16.91
Media Library /wp-admin/upload.php1,809 ▼15.01 ▼0.00150.59 ▼11.67126.24 ▼4.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • tld_actt_activation_date

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)
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/awesome-click-to-tweet/tld-awesome-click-to-tweet.php
  • 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/awesome-click-to-tweet/includes/tld-actt-tinymce-button.php:28

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please specify the plugin name on the first line ( === awesome-click-to-tweet === )
Please take inspiration from this readme.txt

awesome-click-to-tweet/tld-awesome-click-to-tweet.php 92% from 13 tests

The main PHP script in "Awesome Click To Tweet" version 1.0.7 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("awesome-click-to-tweet.php" instead of "tld-awesome-click-to-tweet.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,024 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92461552
PHP58468315
CSS53319120
Markdown115016
SVG10011
Sass12010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.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
6 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshort-2.png34.28KB10.66KB▼ 68.90%
assets/screenshort-6.png14.02KB5.11KB▼ 63.56%
assets/screenshort-5.png14.49KB5.66KB▼ 60.97%
assets/screenshort-4.png12.21KB4.84KB▼ 60.35%
assets/screenshort-1.png3.63KB1.94KB▼ 46.50%