90% assign-widgets

Code Review | Assign Widgets

WordPress plugin Assign Widgets scored90%from 54 tests.

About plugin

  • Plugin page: assign-widgets
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 21, 2018
  • Latest release: Nov 24, 2020
  • Number of updates: 12
  • Update frequency: every 74.0 days
  • Top authors: Themezly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /2,311 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.90ms] Passed 4 tests

Server-side resources used by Assign Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1137.74 ▼1.03
Dashboard /wp-admin3.40 ▲0.0644.62 ▼14.91
Posts /wp-admin/edit.php3.52 ▲0.1643.79 ▼1.01
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.31 ▼6.65
Media Library /wp-admin/upload.php3.33 ▲0.1036.35 ▲0.30

Server storage [IO: ▲0.13MB] [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: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Assign Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.451.93 ▲0.3040.03 ▼3.58
Dashboard /wp-admin2,198 ▲215.61 ▲0.0285.62 ▼5.7338.29 ▼3.62
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0843.59 ▲5.7834.25 ▼0.29
Add New Post /wp-admin/post-new.php1,526 ▼1223.42 ▲0.35637.06 ▼19.8467.39 ▲12.50
Media Library /wp-admin/upload.php1,397 ▼64.12 ▼0.09100.26 ▼0.6943.20 ▼6.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

assign-widgets/assign-widgets.php Passed 13 tests

The main PHP file in "Assign Widgets" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
55 characters long description:
Assign widgets to selected pages or create widget areas

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
There were no executable files found in this plugin1,596 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP3264108667
CSS2723469
PO File3127137301
JavaScript2699159

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity119.00
▷ Minimum class complexity119.00
▷ Maximum class complexity119.00
Average method complexity6.13
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods1565.22%
▷ Protected methods834.78%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
There are no PNG files in this plugin