84% st-widgets

Code Review | ST Widgets

WordPress plugin ST Widgets scored84%from 54 tests.

About plugin

  • Plugin page: st-widgets
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Jul 11, 2022
  • Number of updates: 5
  • Update frequency: every 4.8 days
  • Top authors: stuser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.41ms] Passed 4 tests

Analyzing server-side resources used by ST Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.16 ▲3.27
Dashboard /wp-admin3.35 ▲0.0450.71 ▼2.62
Posts /wp-admin/edit.php3.40 ▲0.0457.66 ▲6.12
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.65 ▼19.28
Media Library /wp-admin/upload.php3.27 ▲0.0439.18 ▼3.00
ST Widgets Options /wp-admin/options-general.php?page=st-widgets-plugin-options3.2435.14

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

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

Browser metrics Passed 4 tests

A check of browser resources used by ST Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.34 ▼0.242.36 ▲0.3743.70 ▲1.29
Dashboard /wp-admin2,202 ▲285.66 ▲0.0784.95 ▼7.7344.56 ▲2.92
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0138.09 ▲3.2635.99 ▲0.11
Add New Post /wp-admin/post-new.php1,539 ▲1018.27 ▼4.72654.16 ▲44.3263.73 ▲7.44
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.0498.98 ▼15.6745.79 ▲0.02
ST Widgets Options /wp-admin/options-general.php?page=st-widgets-plugin-options8332.0223.4828.61

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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/st-widgets/st_widgets.php:226

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

st-widgets/st_widgets.php 92% from 13 tests

The main PHP script in "ST Widgets" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("st-widgets.php" instead of "st_widgets.php")

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
No dangerous file extensions were detected184 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1437184

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin