84% combined-image-and-text-widget

Code Review | Combined Image and Text Widget

WordPress plugin Combined Image and Text Widget scored84%from 54 tests.

About plugin

  • Plugin page: combined-image-an...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Jun 20, 2015
  • Latest release: Oct 7, 2016
  • Number of updates: 6
  • Update frequency: every 79.5 days
  • Top authors: Nadav Rotchild (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▲1.32ms] Passed 4 tests

This is a short check of server-side resources used by Combined Image and Text Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.14 ▼3.15
Dashboard /wp-admin3.41 ▲0.1151.85 ▼1.35
Posts /wp-admin/edit.php3.53 ▲0.1749.81 ▲6.33
Add New Post /wp-admin/post-new.php6.00 ▲0.1095.82 ▲9.04
Media Library /wp-admin/upload.php3.32 ▲0.0937.84 ▲3.44

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

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

Browser metrics Passed 4 tests

Combined Image and Text Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲20714.65 ▲0.051.68 ▼0.6540.41 ▼3.23
Dashboard /wp-admin2,342 ▲1516.45 ▲1.58127.93 ▲16.3639.87 ▼3.84
Posts /wp-admin/edit.php2,254 ▲1653.34 ▲1.3551.71 ▲14.9730.53 ▼4.20
Add New Post /wp-admin/post-new.php1,530 ▼322.97 ▲1.79612.50 ▼88.9535.05 ▼20.17
Media Library /wp-admin/upload.php1,393 ▲24.15 ▲0.0182.97 ▼13.0742.79 ▼2.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_combined_image_text_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/combined-image-and-text-widget/citw.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: wpml, images, links, widget, plugin...

combined-image-and-text-widget/citw.php 92% from 13 tests

"Combined Image and Text Widget" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("combined-image-and-text-widget.php" instead of "citw.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin384 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16563357
JavaScript15027

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity98.00
▷ Minimum class complexity98.00
▷ Maximum class complexity98.00
Average method complexity9.82
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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