83% click-tweet

Code Review | Click & Tweet

WordPress plugin Click & Tweet scored83%from 54 tests.

About plugin

  • Plugin page: click-tweet
  • Plugin version: 0.8.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 19, 2015
  • Latest release: Jun 22, 2016
  • Number of updates: 31
  • Update frequency: every 6.0 days
  • Top authors: Space_Studio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /4,430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼0.65ms] Passed 4 tests

Analyzing server-side resources used by Click & Tweet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.02 ▲2.91
Dashboard /wp-admin3.44 ▲0.1448.06 ▲1.15
Posts /wp-admin/edit.php3.56 ▲0.2048.22 ▼0.39
Add New Post /wp-admin/post-new.php6.31 ▲0.4292.68 ▼6.25
Media Library /wp-admin/upload.php3.36 ▲0.1336.95 ▲5.11
Click & Tweet /wp-admin/options-general.php?page=click-and-tweet3.3330.80

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Click & Tweet
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11513.49 ▼0.858.23 ▲6.5344.51 ▼0.68
Dashboard /wp-admin2,196 ▲225.55 ▼0.1182.57 ▼5.1637.30 ▼3.37
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0439.38 ▲4.0235.74 ▲1.17
Add New Post /wp-admin/post-new.php1,556 ▲2818.26 ▼5.27710.59 ▲56.6637.83 ▼7.65
Media Library /wp-admin/upload.php1,401 ▲44.16 ▼0.0696.36 ▼11.2847.99 ▲0.37
Click & Tweet /wp-admin/options-general.php?page=click-and-tweet1,0792.7150.9832.96

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • 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 short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 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-tweet/click-and-tweet.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

click-tweet/click-and-tweet.php 77% from 13 tests

Analyzing the main PHP file in "Click & Tweet" version 0.8.9
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("click-tweet.php" instead of "click-and-tweet.php")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Everything looks great! No dangerous files found in this plugin1,479 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157262581
JavaScript48688473
CSS26212425

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity78.00
▷ Minimum class complexity78.00
▷ Maximum class complexity78.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods47
▷ Static methods36.38%
▷ Public methods3982.98%
▷ Protected methods00.00%
▷ Private methods817.02%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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-logo-white.png1.46KB0.97KB▼ 33.67%
assets/img/twitter-logo.png1.69KB1.02KB▼ 39.81%