88% r1-widget

Code Review | Resolution1 (R1) Contact Widget

WordPress plugin Resolution1 (R1) Contact Widget scored88%from 54 tests.

About plugin

  • Plugin page: r1-widget
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.7
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Mar 30, 2021
  • Number of updates: 27
  • Update frequency: every 21.7 days
  • Top authors: resolution1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼12.66ms] Passed 4 tests

Analyzing server-side resources used by Resolution1 (R1) Contact Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.10 ▼6.04
Dashboard /wp-admin3.38 ▲0.0850.89 ▼16.62
Posts /wp-admin/edit.php3.49 ▲0.1450.00 ▼3.23
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.78 ▼20.17
Media Library /wp-admin/upload.php3.30 ▲0.0736.70 ▼7.80
Resolution1 (R1) Contact Widget /wp-admin/options-general.php?page=my-setting-admin3.2835.83

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_resolution1wp_widget
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Resolution1 (R1) Contact Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.39 ▼0.231.69 ▼0.1738.51 ▼6.50
Dashboard /wp-admin2,202 ▲225.57 ▼0.0888.69 ▼11.2340.67 ▼2.66
Posts /wp-admin/edit.php2,104 ▲71.96 ▼0.0335.81 ▼3.5634.68 ▼1.34
Add New Post /wp-admin/post-new.php1,529 ▲323.39 ▲0.48666.90 ▼45.5358.21 ▲0.14
Media Library /wp-admin/upload.php1,401 ▲14.19 ▲0.0797.97 ▼18.2543.15 ▼6.24
Resolution1 (R1) Contact Widget /wp-admin/options-general.php?page=my-setting-admin8442.0424.2964.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_resolution1wp_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: A description for screenshot #1 is missing in r1-widget/assets to your readme.txt
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

r1-widget/resolution-widget.php 69% from 13 tests

"Resolution1 (R1) Contact Widget" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("r1-widget.php" instead of "resolution-widget.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 206 characters long)
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Text Domain: Please use dashes and lowercase characters for text domains

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 plugin523 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP597274423
XML400100

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.33
▷ Minimum class complexity3.00
▷ Maximum class complexity14.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods418.18%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.13MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/favicon.png137.62KB30.74KB▼ 77.66%