84% twttr-widget

Code Review | Twttr Widget

WordPress plugin Twttr Widget scored 84% from 54 tests.

About plugin

  • Plugin page: twttr-widget
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Dec 6, 2013
  • Number of updates: 5
  • Update frequency: every 10.2 days
  • Top authors: bjornjohansen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,589 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.85ms] Passed 4 tests

This is a short check of server-side resources used by Twttr Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.15 ▼2.64
Dashboard /wp-admin3.31 ▲0.0144.32 ▼6.23
Posts /wp-admin/edit.php3.36 ▲0.0145.93 ▼2.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.89 ▼24.28
Media Library /wp-admin/upload.php3.24 ▲0.0133.59 ▼1.20

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Twttr Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.171.75 ▼0.1041.93 ▼5.45
Dashboard /wp-admin2,206 ▲185.86 ▲0.98105.04 ▼9.7737.97 ▼8.76
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.15 ▲4.4838.82 ▲3.09
Add New Post /wp-admin/post-new.php1,514 ▼2817.54 ▼0.71660.65 ▲33.1255.66 ▼1.09
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.0598.66 ▲1.4742.89 ▲0.10

Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 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 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_bj_twttr_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twttr-widget/twttr-widget.php:33

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: twitter, widget, jquery

twttr-widget/twttr-widget.php 92% from 13 tests

The main PHP file in "Twttr Widget" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected62 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1242161
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin