10% special-teaser-widget

Code Review | Special Teaser Widget

WordPress plugin Special Teaser Widget scored10%from 54 tests.

About plugin

  • Plugin page: special-teaser-wi...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.3
  • WordPress version: 6.3.1
  • First release: Oct 30, 2011
  • Latest release: Aug 17, 2015
  • Number of updates: 25
  • Update frequency: every 55.5 days
  • Top authors: tepelstreel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,920 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/special-teaser-widget/special-teaser-widget.php+74
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.50MB] [CPU: ▼0.52ms] Passed 4 tests

This is a short check of server-side resources used by Special Teaser Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5242.97 ▲1.93
Dashboard /wp-admin3.84 ▲0.5448.55 ▼1.71
Posts /wp-admin/edit.php3.89 ▲0.5451.78 ▲0.17
Add New Post /wp-admin/post-new.php6.36 ▲0.4896.42 ▼1.62
Media Library /wp-admin/upload.php3.70 ▲0.4838.53 ▲1.09
Special Teaser Widget /wp-admin/plugins.php?page=special-teaser-settings3.6536.54

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
stw_options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Special Teaser Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.21 ▼1.181.74 ▼0.2840.46 ▼4.14
Dashboard /wp-admin2,211 ▲235.86 ▼0.03107.99 ▲1.5382.14 ▲40.70
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0041.15 ▲2.4638.11 ▼0.38
Add New Post /wp-admin/post-new.php1,522 ▲323.05 ▲1.76671.19 ▲62.0455.00 ▲0.07
Media Library /wp-admin/upload.php1,390 ▲24.23 ▼0.01101.09 ▼4.9370.88 ▲27.37
Special Teaser Widget /wp-admin/plugins.php?page=special-teaser-settings1,2995.3974.7956.59

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=special-teaser-settings
    • > Notice in wp-content/plugins/special-teaser-widget/class-lib/STW_AdminClass.php+407
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'A5_DynamicFiles' not found in wp-content/plugins/special-teaser-widget/class-lib/STW_DynamicCSSClass.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'A5_OptionPage' not found in wp-content/plugins/special-teaser-widget/class-lib/STW_AdminClass.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/special-teaser-widget/class-lib/A5_WidgetClass.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'A5_Widget' not found in wp-content/plugins/special-teaser-widget/class-lib/STW_WidgetClass.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/plugins.php?page=special-teaser-settings
    • > Network (severe)
    https://button.flattr.com/flattr-badge-large.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The empty options page with the dummy widget), #2 (The options page while creating a style), #3 (One instance of the widget in action), #4 (Two widgets with different styles on our testing page)
The official readme.txt is a good inspiration

special-teaser-widget/special-teaser-widget.php 92% from 13 tests

This is the main PHP file of "Special Teaser Widget" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 228 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,562 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP101,4434871,786
PO File2231317549
JavaScript26516161
CSS11166

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity28.90
▷ Minimum class complexity13.00
▷ Maximum class complexity78.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods100
▷ Static methods3232.00%
▷ Public methods9191.00%
▷ Protected methods00.00%
▷ Private methods99.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/a5-icon-11.png0.67KB0.42KB▼ 37.17%
img/a5-icon-16.png0.77KB0.57KB▼ 25.99%
img/a5-icon-34.png1.65KB1.35KB▼ 18.07%