84% widget-for-yandex-zen

Code Review | Widget for Zen

WordPress plugin Widget for Zen scored 84% from 54 tests.

About plugin

  • Plugin page: widget-for-yandex...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 10, 2018
  • Latest release: Sep 16, 2022
  • Number of updates: 33
  • Update frequency: every 51.9 days
  • Top authors: fromgate (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 7,069 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.59ms] Passed 4 tests

An overview of server-side resources used by Widget for Zen
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.85 ▼2.39
Dashboard /wp-admin3.39 ▲0.0849.98 ▼1.90
Posts /wp-admin/edit.php3.50 ▲0.1450.76 ▲4.69
Add New Post /wp-admin/post-new.php5.97 ▲0.0896.51 ▼7.95
Media Library /wp-admin/upload.php3.31 ▲0.0835.66 ▼2.12
Widget for Zen /wp-admin/options-general.php?page=zw-settings3.2835.17

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_zen_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget for Zen
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.40 ▼0.181.74 ▼0.3042.65 ▼6.59
Dashboard /wp-admin2,207 ▲185.90 ▲1.01109.14 ▼16.5743.75 ▼2.21
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0139.74 ▲0.9435.86 ▲3.18
Add New Post /wp-admin/post-new.php1,545 ▲1118.42 ▼4.72614.06 ▼25.5249.81 ▼2.05
Media Library /wp-admin/upload.php1,389 ▼24.19 ▼0.1096.30 ▼8.3744.06 ▲2.12
Widget for Zen /wp-admin/options-general.php?page=zw-settings9092.0829.0233.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_zen_widget
    • db_upgraded
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/widget-for-yandex-zen/option.php:216
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/widget-for-yandex-zen/option.php:216

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: zen widget, widget, yandex zen, zen

widget-for-yandex-zen/widget-for-yandex-zen.php Passed 13 tests

"Widget for Zen" version 1.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
This plugin provides Widget for Zen Blogging Platform.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected357 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36065325
CSS12032

PHP code Passed 2 tests

Analyzing 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.26
Average class complexity13.67
▷ Minimum class complexity2.00
▷ Maximum class complexity28.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/zen-icon-32.png0.97KB1.07KB0.00%
images/zen_logo_red_32.png0.79KB0.79KB0.00%
images/zen_logo_star_32.png1.87KB1.75KB▼ 6.33%
images/zen_logo_broken_32.png1.16KB1.07KB▼ 7.98%
images/zen_logo_blue_32.png2.78KB1.07KB▼ 61.53%