84% ws-twitter-tweets-widget

Code Review | WS Twitter Tweets Widget

WordPress plugin WS Twitter Tweets Widget scored84%from 54 tests.

About plugin

  • Plugin page: ws-twitter-tweets...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Sep 12, 2016
  • Number of updates: 52
  • Update frequency: every 6.5 days
  • Top authors: webshouter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /10,624 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.05MB] [CPU: ▼6.50ms] Passed 4 tests

Server-side resources used by WS Twitter Tweets Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.35 ▲0.42
Dashboard /wp-admin3.35 ▲0.0547.89 ▼4.67
Posts /wp-admin/edit.php3.40 ▲0.0545.66 ▼5.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.40 ▼16.26
Media Library /wp-admin/upload.php3.28 ▲0.0538.52 ▲2.76

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

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

Browser metrics Passed 4 tests

WS Twitter Tweets Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▼0.031.69 ▼0.2538.61 ▼1.33
Dashboard /wp-admin2,192 ▲155.52 ▼0.0385.25 ▼17.0541.07 ▼18.94
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0135.76 ▼0.1935.52 ▲0.65
Add New Post /wp-admin/post-new.php1,531 ▼1723.28 ▼0.05653.84 ▼17.4669.45 ▲16.81
Media Library /wp-admin/upload.php1,403 ▲64.12 ▼0.06108.49 ▲5.3846.73 ▲3.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_ws_twitter_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ws-twitter-tweets-widget/ws-twitter-tweets-widget.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

ws-twitter-tweets-widget/ws-twitter-tweets-widget.php Passed 13 tests

The principal PHP file in "WS Twitter Tweets Widget" v. 1.0 is loaded by WordPress automatically on each request
95 characters long description:
Our WS Twitter Tweets Widget provides easy to add twitter recent tweets on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin200 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23215200

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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
No PNG images were found in this plugin