90% image-text-widget

Code Review | Image & Text Widget

WordPress plugin Image & Text Widget scored 90% from 54 tests.

About plugin

  • Plugin page: image-text-widget
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2014
  • Latest release: Apr 28, 2015
  • Number of updates: 11
  • Update frequency: every 26.4 days
  • Top authors: dfactory (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 24,948 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.81ms] Passed 4 tests

Server-side resources used by Image & Text Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1449.97 ▲2.29
Dashboard /wp-admin3.42 ▲0.1253.04 ▼24.56
Posts /wp-admin/edit.php3.47 ▲0.1156.99 ▲2.24
Add New Post /wp-admin/post-new.php6.01 ▲0.1298.41 ▲6.87
Media Library /wp-admin/upload.php3.35 ▲0.1240.05 ▲0.79

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
image_text_widget_version
widget_image_text_widget
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Image & Text Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.17 ▼0.131.95 ▲0.0742.74 ▼2.75
Dashboard /wp-admin2,209 ▲34.83 ▼0.04109.53 ▼3.2537.83 ▼4.95
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0238.84 ▲3.3136.82 ▲4.53
Add New Post /wp-admin/post-new.php1,542 ▲918.46 ▼4.71611.38 ▼80.0861.82 ▲9.13
Media Library /wp-admin/upload.php1,391 ▲64.27 ▲0.0897.12 ▼15.6042.08 ▼3.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_image_text_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 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
10 plugin tags: uploader, widget-only, widgets, widget, html...

image-text-widget/image-text-widget.php Passed 13 tests

Analyzing the main PHP file in "Image & Text Widget" version 1.0.3
131 characters long description:
Image & Text Widget is an easy to use plugin that uses the native WordPress media manager to add image & text widgets to your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected603 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP38854350
PO File2227525156
JavaScript116074
CSS10023

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity43.50
▷ Minimum class complexity2.00
▷ Maximum class complexity85.00
Average method complexity9.50
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin