10% mywidget-recommendations

Code Review | myWidget recommendations

WordPress plugin myWidget recommendations scored 10% from 54 tests.

About plugin

  • Plugin page: mywidget-recommen...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jul 7, 2017
  • Latest release: Jul 7, 2017
  • Number of updates: 12
  • Update frequency: every 2.9 days
  • Top authors: aliramazanov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,390 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mywidget-recommendations/includes/class-mywidget-recommendations.php+169
    Function create_function() is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼54.93ms] Passed 4 tests

This is a short check of server-side resources used by myWidget recommendations
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.88 ▼37.40
Dashboard /wp-admin2.12 ▼1.188.30 ▼42.95
Posts /wp-admin/edit.php2.12 ▼1.235.86 ▼38.52
Add New Post /wp-admin/post-new.php2.12 ▼3.766.63 ▼100.84
Media Library /wp-admin/upload.php2.12 ▼1.116.12 ▼26.85

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

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

Browser metrics Passed 4 tests

Checking browser requirements for myWidget recommendations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲17013.92 ▼0.2822.97 ▲21.3049.56 ▲9.62
Dashboard /wp-admin2,225 ▲365.84 ▲0.9198.94 ▼33.5285.29 ▲40.41
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0433.84 ▼5.8933.01 ▼2.79
Add New Post /wp-admin/post-new.php1,685 ▲15722.44 ▲4.05620.35 ▼51.2753.58 ▼8.29
Media Library /wp-admin/upload.php1,404 ▲164.15 ▼0.01109.50 ▲2.6447.05 ▲4.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/mywidget-recommendations/includes/class-mywidget-recommendations.php+169
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_mywidget-recommendations
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mywidget-recommendations/public/partials/mycom-widget-public-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mywidget-recommendations/includes/class-mywidget-recommendations-view.php:25
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/mywidget-recommendations/admin/partials/mywidget-recommendations-admin-display.php:20

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 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (**myWidget's settings page**) image not found
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

mywidget-recommendations/mywidget-recommendations.php 92% from 13 tests

The entry point to "myWidget recommendations" version 1.0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin318 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13144599263
PO File17749
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3083.33%
▷ Protected methods00.00%
▷ Private methods616.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/mywidget_menu_icon.png0.57KB0.77KB0.00%
assets/screenshot-1.png242.72KB60.79KB▼ 74.96%
public/img/mycom_widget.png5.83KB3.02KB▼ 48.18%