10% click-to-tweet-by-todaymade

Code Review | Click To Tweet

WordPress plugin Click To Tweet scored 10% from 54 tests.

About plugin

  • Plugin page: click-to-tweet-by...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9.8
  • WordPress version: 5.8.1
  • First release: May 13, 2013
  • Latest release: Nov 9, 2018
  • Number of updates: 18
  • Update frequency: every 111.9 days
  • Top authors: todaymade (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

6,000+ active / 85,236 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method tm_clicktotweet::activation() should not be called statically

Server metrics [RAM: ▲0.04MB] [CPU: ▼138.06ms] Passed 4 tests

This is a short check of server-side resources used by Click To Tweet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1534.68 ▲9.92
Dashboard /wp-admin3.11 ▲0.0557.02 ▲18.64
Posts /wp-admin/edit.php3.16 ▲0.0552.89 ▲3.76
Add New Post /wp-admin/post-new.php5.47 ▲0.0389.31 ▼570.71
Media Library /wp-admin/upload.php3.05 ▲0.0536.12 ▲4.80
Click To Tweet /wp-admin/options-general.php?page=tmclicktotweet3.0028.18

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Click To Tweet
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲9015.76 ▲0.306.99 ▼3.3250.07 ▼4.84
Dashboard /wp-admin2,972 ▲355.90 ▼0.01147.26 ▼7.30124.87 ▲5.30
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0269.94 ▼1.0499.87 ▲0.66
Add New Post /wp-admin/post-new.php1,686 ▼2,00118.69 ▲3.62388.20 ▼105.07111.53 ▼12.11
Media Library /wp-admin/upload.php1,812 ▲55.01 ▲0.02155.82 ▲5.82123.55 ▲4.28
Click To Tweet /wp-admin/options-general.php?page=tmclicktotweet1,1292.0558.6683.99

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+303
    Non-static method tm_clicktotweet::deactivation() should not be called statically

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=tmclicktotweet
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=tmclicktotweet
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/click-to-tweet-by-todaymade/tm-click-to-tweet.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=tmclicktotweet
    • > Network (severe)
    http://space.todaymade.com/wp-plugins/click-to-tweet-sidebar/coschedule-Sidebar.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% 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
8 plugin tags: twitter boxes, share, twitter, tweet, click to tweet...

click-to-tweet-by-todaymade/tm-click-to-tweet.php 92% from 13 tests

The entry point to "Click To Tweet" version 1.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("click-to-tweet-by-todaymade.php" instead of "tm-click-to-tweet.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected365 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS100171
PHP14473167
JavaScript10027

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/twitter-little-bird-button.png1.15KB0.42KB▼ 63.56%
assets/img/twitter-little-bird.png1.14KB0.42KB▼ 63.18%