10% twitter-mentions-as-comments

Code Review | Twitter Mentions As Comments

WordPress plugin Twitter Mentions As Comments scored10%from 54 tests.

About plugin

  • Plugin page: twitter-mentions-...
  • Plugin version: 1.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Nov 29, 2010
  • Latest release: Jul 4, 2013
  • Number of updates: 83
  • Update frequency: every 11.4 days
  • Top authors: benbalter (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /40,824 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/twitter-mentions-as-comments/includes/boilerplate/class.plugin-boilerplate.php+50
    A non-numeric value encountered

Server metrics [RAM: ▼1.62MB] [CPU: ▼54.69ms] Passed 4 tests

An overview of server-side resources used by Twitter Mentions As Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.37 ▼1.107.37 ▼37.98
Dashboard /wp-admin2.39 ▼0.928.19 ▼50.24
Posts /wp-admin/edit.php2.39 ▼0.979.44 ▼43.84
Add New Post /wp-admin/post-new.php2.39 ▼3.508.75 ▼86.69
Media Library /wp-admin/upload.php2.39 ▼0.847.41 ▼33.41
Twitter -> Comments /wp-admin/options-general.php?page=tmac_options2.397.02

Server storage [IO: ▲0.42MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
twitter_mentions_as_comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Twitter Mentions As Comments: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.14 ▼0.041.55 ▼0.1940.25 ▼4.29
Dashboard /wp-admin2,213 ▲335.67 ▲0.0086.94 ▼10.5440.90 ▼1.80
Posts /wp-admin/edit.php2,122 ▲252.00 ▲0.0438.56 ▲1.8334.43 ▼0.17
Add New Post /wp-admin/post-new.php1,544 ▲1823.53 ▲0.17627.72 ▼69.0251.50 ▼8.12
Media Library /wp-admin/upload.php1,421 ▲274.19 ▲0.02101.47 ▼0.0743.46 ▼2.44
Twitter -> Comments /wp-admin/options-general.php?page=tmac_options1,0062.2032.8330.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/twitter-mentions-as-comments/includes/boilerplate/class.plugin-boilerplate.php+50
    A non-numeric value encountered
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • twitter_mentions_as_comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=tmac_options
    • > Warning in wp-content/plugins/twitter-mentions-as-comments/includes/boilerplate/class.plugin-boilerplate.php+50
    A non-numeric value encountered
    • > GET request to /wp-admin/options-general.php?page=tmac_options
    • > Notice in wp-content/plugins/twitter-mentions-as-comments/includes/boilerplate/class.plugin-boilerplate.php+50
    A non well formed numeric value encountered
    • > GET request to /wp-admin/options-general.php?page=tmac_options
    • > User notice in wp-content/plugins/twitter-mentions-as-comments/includes/boilerplate/class.plugin-boilerplate.php+111
    Twitter Mentions as Comments -- Unable to load class Twitter_Mentions_As_Comments_Codebird. see the readme for class and file naming conventions

SRP 0% from 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/twitter-mentions-as-comments/cron.php
  • 7× 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/twitter-mentions-as-comments/includes/tlc-transients/tlc-transients.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-mentions-as-comments/includes/tlc-transients/tlc-transients.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/twitter-mentions-as-comments/templates/sample-options.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/twitter-mentions-as-comments/templates/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/twitter-mentions-as-comments/templates/upgrade-wp.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/twitter-mentions-as-comments/templates/donate.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/twitter-mentions-as-comments/templates/forced-refresh.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: twitter, comments, social, mentions, social media

twitter-mentions-as-comments/twitter-mentions-as-comments.php Passed 13 tests

"Twitter Mentions As Comments" version 1.5.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
Queries the Twitter API on a regular basis for tweets about your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,663 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP206831,0831,747
HTML11230571
Markdown6650210
PO File1353796
JavaScript27226
CoffeeScript15013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.27
▷ Minimum class complexity2.00
▷ Maximum class complexity92.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods131
▷ Static methods32.29%
▷ Public methods11587.79%
▷ Protected methods86.11%
▷ Private methods86.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin