90% comment-tweets

Code Review | Comment Tweets

WordPress plugin Comment Tweets scored90%from 54 tests.

About plugin

  • Plugin page: comment-tweets
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.2.1
  • WordPress version: 6.3.1
  • First release: Oct 31, 2012
  • Latest release: Jan 7, 2017
  • Number of updates: 25
  • Update frequency: every 61.6 days
  • Top authors: tommcfarlin (92%)philiparthurmoore (12%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,382 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.04ms] Passed 4 tests

This is a short check of server-side resources used by Comment Tweets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0435.01 ▼0.47
Dashboard /wp-admin3.34 ▼0.0047.92 ▼12.58
Posts /wp-admin/edit.php3.39 ▲0.0446.91 ▼1.11
Add New Post /wp-admin/post-new.php5.94 ▲0.0681.37 ▼22.01
Media Library /wp-admin/upload.php3.26 ▲0.0434.87 ▲2.17

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Comment Tweets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.31 ▼1.071.61 ▼0.1440.46 ▲0.27
Dashboard /wp-admin2,210 ▲254.87 ▼0.04107.52 ▲8.7837.22 ▼5.08
Posts /wp-admin/edit.php2,093 ▲12.02 ▲0.0141.23 ▼2.2634.56 ▼6.00
Add New Post /wp-admin/post-new.php6,237 ▲4,71625.88 ▲2.88862.34 ▲192.4863.47 ▲9.47
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0896.63 ▼7.1740.90 ▼11.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (The default tweet form in the Post Editor Dashboard), #2 (Adding a single tweet to a post), #3 (Displaying multiple tweets to readers)
Please take inspiration from this readme.txt

comment-tweets/comment-tweets.php Passed 13 tests

"Comment Tweets" version 2.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
108 characters long description:
Comment Tweets gives you the ability to take the URL of a tweet and add it to the conversation on your blog.

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
Success! There were no dangerous files found in this plugin185 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP292161134
PO File12220
JavaScript28418
LESS21011
CSS2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png114.29KB37.65KB▼ 67.06%
screenshot-1.png17.35KB6.03KB▼ 65.24%
screenshot-2.png17.77KB6.47KB▼ 63.57%