84% widget-alias

Code Review | Widget Alias

WordPress plugin Widget Alias scored84%from 54 tests.

About plugin

  • Plugin page: widget-alias
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2013
  • Latest release: May 9, 2023
  • Number of updates: 33
  • Update frequency: every 105.0 days
  • Top authors: McGuive7 (66.67%)aaronbmm (24.24%)aebs90 (15.15%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /7,495 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
Installer ran successfully

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

Server-side resources used by Widget Alias
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.39 ▲0.48
Dashboard /wp-admin3.35 ▲0.0446.34 ▼1.74
Posts /wp-admin/edit.php3.40 ▲0.0449.19 ▼1.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.43 ▲9.90
Media Library /wp-admin/upload.php3.27 ▲0.0436.36 ▲2.60

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_widget-alias
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Widget Alias
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.52 ▼0.831.65 ▼0.0843.69 ▲3.79
Dashboard /wp-admin2,206 ▲205.85 ▲0.8898.67 ▼19.2439.05 ▼3.40
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0541.67 ▲1.3137.16 ▼1.06
Add New Post /wp-admin/post-new.php1,677 ▲14424.93 ▲1.75604.69 ▼19.1251.70 ▼1.66
Media Library /wp-admin/upload.php1,388 ▼34.30 ▲0.0694.19 ▼2.4640.90 ▼1.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_widget-alias
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/widget-alias/widget-alias.php:22

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Please a description for screenshot #2 in widget-alias/assets to your readme.txt
The official readme.txt is a good inspiration

widget-alias/widget-alias.php Passed 13 tests

"Widget Alias" version 1.7.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Creates an alias widget so you only have to edit once.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin222 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP172125147
JavaScript1321456
CSS14119

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin