83% still-be-widget

Code Review | Still BE Widgets

WordPress plugin Still BE Widgets scored 83% from 54 tests.

About plugin

  • Plugin page: still-be-widget
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3
  • WordPress version: 5.9.2
  • First release: Apr 1, 2020
  • Latest release: Apr 1, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: analogstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Still BE Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2156.56 ▲5.43
Dashboard /wp-admin3.56 ▲0.1535.45 ▲2.52
Posts /wp-admin/edit.php3.78 ▲0.1539.29 ▼3.05
Add New Post /wp-admin/post-new.php7.03 ▲0.0695.02 ▼1,178.40
Media Library /wp-admin/upload.php3.44 ▲0.1425.18 ▼0.30
Insta Widget /wp-admin/admin.php?page=stillbe-widgets-settings_insta-widget3.3826.15
Still BE Widgets /wp-admin/admin.php?page=stillbe-widgets-settings3.4123.54

Server storage [IO: ▲0.37MB] [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, 1 new option
New WordPress options
widget_stillbe_widgets-insta_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Still BE Widgets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲6115.93 ▲0.275.90 ▲0.002.28 ▼0.56
Dashboard /wp-admin2,928 ▲746.15 ▼0.07117.85 ▼23.34152.09 ▼24.76
Posts /wp-admin/edit.php2,733 ▲423.37 ▲0.1464.19 ▼2.05142.44 ▼5.75
Add New Post /wp-admin/post-new.php1,689 ▼6315.92 ▼5.08413.09 ▼54.25159.05 ▼0.10
Media Library /wp-admin/upload.php1,738 ▲405.54 ▲0.04132.29 ▼10.12185.81 ▲4.52
Insta Widget /wp-admin/admin.php?page=stillbe-widgets-settings_insta-widget1,2562.5761.20170.48
Still BE Widgets /wp-admin/admin.php?page=stillbe-widgets-settings1,0132.7352.9799.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_stillbe_widgets-insta_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=stillbe-widgets-settings_insta-widget
    • > Notice in wp-content/plugins/still-be-widget/still-be-widgets.php+145
    Undefined index: ig
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=stillbe-widgets-settings_insta-widget
    • > Notice in wp-content/plugins/still-be-widget/still-be-widgets.php+149
    Trying to access array offset on value of type null

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (assets/screenshots/widget_image.png), #2 (assets/screenshots/widget_setting.png), #3 (assets/screenshots/user_management.png)
The official readme.txt might help

still-be-widget/still-be-widgets.php 85% from 13 tests

The entry point to "Still BE Widgets" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("still-be-widget.php" instead of "still-be-widgets.php")

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
No dangerous file extensions were detected1,313 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131176573
JavaScript2123258419
CSS1511241
PO File134080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity36.67
▷ Minimum class complexity16.00
▷ Maximum class complexity54.00
Average method complexity11.70
▷ Minimum method complexity2.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants9
▷ Global constants222.22%
▷ Class constants777.78%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.27MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/screenshots/user_management.png48.24KB20.48KB▼ 57.56%
asset/screenshots/widget_setting.png28.53KB11.33KB▼ 60.29%
asset/screenshots/widget_image.png197.97KB64.27KB▼ 67.53%