10% ts-widget-pack

Code Review | Widget Pack

WordPress plugin Widget Pack scored10%from 54 tests.

About plugin

  • Plugin page: ts-widget-pack
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2012
  • Latest release: Jun 27, 2016
  • Number of updates: 12
  • Update frequency: every 111.1 days
  • Top authors: slobodanmanic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /19,901 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ts-widget-pack/widgets/call-to-action.php+13
    Function create_function() is deprecated

Server metrics [RAM: ▼1.95MB] [CPU: ▼50.24ms] Passed 4 tests

Analyzing server-side resources used by Widget Pack
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.33 ▼35.97
Dashboard /wp-admin2.06 ▼1.245.19 ▼44.99
Posts /wp-admin/edit.php2.06 ▼1.295.17 ▼41.08
Add New Post /wp-admin/post-new.php2.06 ▼3.835.56 ▼78.91
Media Library /wp-admin/upload.php2.06 ▼1.175.61 ▼26.53

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 12 new options
New WordPress options
widget_ts_widgets_list_authors
widget_theysaidso_widget
widget_ts_widgets_oembed
widget_recent-comments
widget_ts_widgets_call_to_action
can_compress_scripts
db_upgraded
widget_ts_widgets_preview_post
widget_ts_widgets_social_icons
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Widget Pack
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲8613.75 ▼0.608.57 ▲6.7042.48 ▼3.56
Dashboard /wp-admin2,189 ▲185.57 ▼0.0987.24 ▲1.4236.60 ▼4.42
Posts /wp-admin/edit.php2,103 ▼02.03 ▼0.0141.25 ▲4.4934.33 ▲0.79
Add New Post /wp-admin/post-new.php1,526 ▼223.88 ▲0.78674.31 ▲11.9863.88 ▲12.52
Media Library /wp-admin/upload.php1,397 ▼64.21 ▲0.0199.74 ▼6.3244.41 ▼3.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ts-widget-pack/widgets/call-to-action.php+13
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 12 options in the database
    • db_upgraded
    • widget_ts_widgets_social_icons
    • can_compress_scripts
    • widget_recent-posts
    • widget_ts_widgets_call_to_action
    • widget_ts_widgets_oembed
    • widget_recent-comments
    • widget_ts_widgets_list_authors
    • widget_ts_widgets_preview_post
    • widget_theysaidso_widget
    • ...

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
Good news, no errors were detected

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 take a closer look at the following
  • 7× 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/ts-widget-pack/ts-widget-pack.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-widget-pack/widgets/page-tree.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-widget-pack/widgets/call-to-action.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-widget-pack/widgets/preview-post.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-widget-pack/widgets/list-authors.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-widget-pack/widgets/oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-widget-pack/widgets/social-icons.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (List of TS widgets in the dashboard), #2 (oEmbed widget displaying an embedded video from Vimeo), #3 (Call to action widget), #4 (oEmbed widget displaying an embedded tweet), #5 (Post preview and social icons widgets)
You can take inspiration from this readme.txt

ts-widget-pack/ts-widget-pack.php Passed 13 tests

This is the main PHP file of "Widget Pack" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
27 characters long description:
Adds custom widgets to 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 plugin1,266 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP8202433807
CSS22415279
Markdown1600172
JavaScript2428

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.33
▷ Minimum class complexity9.00
▷ Maximum class complexity15.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2480.00%
▷ Protected methods00.00%
▷ Private methods620.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.72MB with 0.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png73.59KB18.70KB▼ 74.59%
screenshot-4.png28.12KB8.66KB▼ 69.21%
screenshot-1.png16.13KB6.22KB▼ 61.45%
images/social-icons.png17.42KB6.26KB▼ 64.07%
screenshot-3.png24.46KB7.35KB▼ 69.96%