10% smilebox-widget

Code Review | SmileBox Widget

WordPress plugin SmileBox Widget scored10%from 54 tests.

About plugin

  • Plugin page: smilebox-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Mar 11, 2016
  • Number of updates: 3
  • Update frequency: every 12.0 days
  • Top authors: karpovigorok (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /517 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/smilebox-widget/front-end/class/SmileBoxWidget.php+418
    Declaration of Walker_SmileBox::paged_walk($elements, $max_depth = '', $page_num = '', $per_page = '') should be compatible with Walker::paged_walk($elements, $max_depth, $page_num, $per_page, ...$args)

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.27ms] Passed 4 tests

Analyzing server-side resources used by SmileBox Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.51 ▼31.78
Dashboard /wp-admin2.05 ▼1.266.14 ▼45.15
Posts /wp-admin/edit.php2.05 ▼1.316.89 ▼40.41
Add New Post /wp-admin/post-new.php2.05 ▼3.848.28 ▼79.73
Media Library /wp-admin/upload.php2.05 ▼1.187.55 ▼25.09

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_smile_box_widget

Browser metrics Passed 4 tests

An overview of browser requirements for SmileBox Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.37 ▲0.172.04 ▲0.2639.98 ▼1.62
Dashboard /wp-admin2,219 ▲425.69 ▲0.1283.94 ▼6.9838.30 ▼2.70
Posts /wp-admin/edit.php2,126 ▲262.27 ▲0.3136.61 ▲0.2634.84 ▼2.05
Add New Post /wp-admin/post-new.php1,542 ▲723.17 ▲4.97650.75 ▼21.1135.71 ▼35.43
Media Library /wp-admin/upload.php1,421 ▲184.44 ▲0.25105.28 ▼3.4245.40 ▲2.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/smilebox-widget/front-end/class/SmileBoxWidget.php+418
    Declaration of Walker_SmileBox::paged_walk($elements, $max_depth = '', $page_num = '', $per_page = '') should be compatible with Walker::paged_walk($elements, $max_depth, $page_num, $per_page, ...$args)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_smile_box_widget
    • widget_recent-comments
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smilebox-widget/front-end/class/SmileBoxWidget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (/assets/screenshots/image_1.png), #2 (/assets/screenshots/image_2.png), #3 (/assets/screenshots/image_3.png), #4 (/assets/screenshots/image_4.png)
  • Plugin Name: Please specify the plugin name on the first line ( === smilebox-widget === )
You can take inspiration from this readme.txt

smilebox-widget/nx-smile-box-widget.php 77% from 13 tests

The main PHP script in "SmileBox Widget" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("smilebox-widget.php" instead of "nx-smile-box-widget.php")
  • Description: The description should be shorter than 140 characters (currently 311 characters long)
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin499 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48959446
CSS13643
JavaScript12610

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.75
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods18
▷ Static methods316.67%
▷ Public methods1583.33%
▷ Protected methods316.67%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.61MB with 0.40MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshots/image_3.png127.19KB48.63KB▼ 61.76%
assets/screenshots/image_4.png193.77KB73.63KB▼ 62.00%
assets/screenshots/image_2.png184.73KB47.48KB▼ 74.30%
assets/screenshots/image_1.png114.11KB41.24KB▼ 63.86%