78% mklasens-dynamic-widget

Code Review | mklasen's Dynamic Widget

WordPress plugin mklasen's Dynamic Widget scored78%from 54 tests.

About plugin

  • Plugin page: mklasens-dynamic-...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: Jun 13, 2017
  • Number of updates: 9
  • Update frequency: every 89.4 days
  • Top authors: mklasen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.92ms] Passed 4 tests

Server-side resources used by mklasen's Dynamic Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.51 ▼0.63
Dashboard /wp-admin3.33 ▼0.0250.99 ▼12.90
Posts /wp-admin/edit.php3.38 ▲0.0254.57 ▼1.60
Add New Post /wp-admin/post-new.php5.97 ▲0.08101.66 ▼4.49
Media Library /wp-admin/upload.php3.25 ▲0.0235.60 ▼0.67

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_mklasens_dynamic_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

mklasen's Dynamic Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.25 ▼0.192.13 ▲0.5042.52 ▼3.78
Dashboard /wp-admin2,221 ▲184.86 ▼0.03116.35 ▼1.5245.18 ▲1.04
Posts /wp-admin/edit.php2,103 ▼02.06 ▲0.0640.28 ▲4.1236.70 ▲1.68
Add New Post /wp-admin/post-new.php1,605 ▲7921.08 ▲3.48714.56 ▲68.6860.32 ▲7.09
Media Library /wp-admin/upload.php1,400 ▼04.36 ▲0.2294.03 ▼13.1739.53 ▼11.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_mklasens_dynamic_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mklasens-dynamic-widget/mklasens-wysiwyg-dynamic-widget.php
  • 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/mklasens-dynamic-widget/widget.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #4 (Overview of Dynamic Widget's)
Please take inspiration from this readme.txt

mklasens-dynamic-widget/mklasens-wysiwyg-dynamic-widget.php 92% from 13 tests

The main PHP script in "mklasen's Dynamic Widget" version 2.0.3 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 ("mklasens-dynamic-widget.php" instead of "mklasens-wysiwyg-dynamic-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin60 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2222260

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.43
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected