84% discuss-on-twitter

Code Review | Discuss on Twitter

WordPress plugin Discuss on Twitter scored84%from 54 tests.

About plugin

  • Plugin page: discuss-on-twitter
  • Plugin version: 0.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 28, 2019
  • Latest release: Apr 30, 2021
  • Number of updates: 18
  • Update frequency: every 27.2 days
  • Top authors: nickgrossman (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /978 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.19ms] Passed 4 tests

This is a short check of server-side resources used by Discuss on Twitter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.36 ▲2.25
Dashboard /wp-admin3.33 ▲0.0248.79 ▼14.53
Posts /wp-admin/edit.php3.38 ▲0.0248.54 ▲1.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.74 ▼11.69
Media Library /wp-admin/upload.php3.25 ▲0.0236.90 ▲0.12
Discuss on Twitter /wp-admin/options-general.php?page=discuss-on-twitter3.2234.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Discuss on Twitter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.07 ▼0.461.93 ▲0.2443.79 ▲1.69
Dashboard /wp-admin2,199 ▲225.61 ▼0.0594.97 ▲2.8741.89 ▲2.52
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0233.54 ▼4.0832.48 ▼4.15
Add New Post /wp-admin/post-new.php1,531 ▼1223.09 ▼0.00664.21 ▼12.2157.75 ▲8.97
Media Library /wp-admin/upload.php1,398 ▼24.24 ▲0.0296.61 ▼14.2746.47 ▲0.60
Discuss on Twitter /wp-admin/options-general.php?page=discuss-on-twitter8121.9927.7334.65

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/discuss-on-twitter/discuss-on-twitter.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

discuss-on-twitter/discuss-on-twitter.php Passed 13 tests

The main PHP script in "Discuss on Twitter" version 0.3 is automatically included on every request by WordPress
50 characters long description:
Use Twitter as the commenting system for your blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin125 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1373295
CSS10030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin