84% comment-by-tweet

Code Review | Comment by Tweet

WordPress plugin Comment by Tweet scored 84% from 54 tests.

About plugin

  • Plugin page: comment-by-tweet
  • Plugin version: 0.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 22, 2015
  • Latest release: Mar 4, 2016
  • Number of updates: 21
  • Update frequency: every 16.6 days
  • Top authors: AmauriC (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,513 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.04MB] [CPU: ▼1.38ms] Passed 4 tests

A check of server-side resources used by Comment by Tweet
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.98 ▼1.31
Dashboard /wp-admin3.34 ▲0.0449.41 ▲3.69
Posts /wp-admin/edit.php3.45 ▲0.1046.98 ▲0.93
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.42 ▼4.51
Media Library /wp-admin/upload.php3.26 ▲0.0334.15 ▼0.63
Comment by Tweet API /wp-admin/tools.php?page=comment-by-tweet-api3.2328.30
Comment by Tweet /wp-admin/options-general.php?page=comment-by-tweet3.2733.77

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: 3 new tables, 6 new options
New tables
wp_cbt_api
wp_cbt_tweets
wp_cbt_hash
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Comment by Tweet: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲22313.99 ▼0.3221.80 ▲20.1543.23 ▲2.39
Dashboard /wp-admin2,216 ▲274.89 ▼0.06103.58 ▼13.3737.53 ▼6.44
Posts /wp-admin/edit.php2,099 ▲132.06 ▲0.0636.15 ▼2.5436.52 ▲2.18
Add New Post /wp-admin/post-new.php6,508 ▲4,96620.51 ▲2.06884.78 ▲292.6660.13 ▲2.77
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0998.60 ▲1.7743.08 ▼4.92
Comment by Tweet API /wp-admin/tools.php?page=comment-by-tweet-api7552.0223.8629.33
Comment by Tweet /wp-admin/options-general.php?page=comment-by-tweet9132.1823.7827.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/comment-by-tweet/templates/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/comment-by-tweet/templates/info.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comment-by-tweet/templates/info.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/comment-by-tweet/API.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comment-by-tweet/Tools.php:8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comment-by-tweet/templates/info.php on line 5
    • > PHP Notice
      Undefined variable: userData in wp-content/plugins/comment-by-tweet/templates/info.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comment-by-tweet/templates/info.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/comment-by-tweet/templates/info.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comment-by-tweet/Admin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: twitter, comment

comment-by-tweet/comment-by-tweet.php Passed 13 tests

"Comment by Tweet" version 0.4.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
55 characters long description:
Système de commentaires basé sur les hashtags Twitter

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,490 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP92474041,305
JavaScript312779
Markdown123050
CSS291944
SVG10012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity33.67
▷ Minimum class complexity2.00
▷ Maximum class complexity88.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods69
▷ Static methods22.90%
▷ Public methods4666.67%
▷ Protected methods00.00%
▷ Private methods2333.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/select.png6.71KB4.57KB▼ 31.81%