83% wp-anywhere-widgets

Code Review | WP Anywhere Widgets

WordPress plugin WP Anywhere Widgets scored83%from 54 tests.

About plugin

  • Plugin page: wp-anywhere-widgets
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Jul 12, 2018
  • Latest release: Apr 10, 2023
  • Number of updates: 15
  • Update frequency: every 115.6 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /859 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.02MB] [CPU: ▼9.31ms] Passed 4 tests

An overview of server-side resources used by WP Anywhere Widgets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.53 ▼8.03
Dashboard /wp-admin3.32 ▲0.0245.96 ▼7.07
Posts /wp-admin/edit.php3.38 ▲0.0251.09 ▲2.27
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.90 ▼17.31
Media Library /wp-admin/upload.php3.25 ▲0.0233.59 ▼4.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Anywhere Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.76 ▼0.0244.17 ▼0.68
Dashboard /wp-admin2,195 ▲275.63 ▲0.0594.54 ▼3.0043.12 ▼6.11
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0138.76 ▼2.0036.46 ▼1.08
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▼0.20672.05 ▼19.4360.11 ▲1.36
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0196.94 ▼12.8140.73 ▼8.77

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wp-anywhere-widgets/anywhere-widgets.php:11

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 errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Stable tag: No string
  • Screenshots: These screenshots lack descriptions #2, #3 in wp-anywhere-widgets/assets to your readme.txt
  • License uri: Please fix this invalid URI: ""
  • License: No string
The official readme.txt might help

wp-anywhere-widgets/anywhere-widgets.php 92% from 13 tests

The primary PHP file in "WP Anywhere Widgets" version 2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-anywhere-widgets.php" instead of "anywhere-widgets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin64 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171164

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected