83% resmio-button-and-widget

Code Review | resmio button & widget

WordPress plugin resmio button & widget scored83%from 54 tests.

About plugin

  • Plugin page: resmio-button-and...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 23, 2015
  • Latest release: Dec 14, 2021
  • Number of updates: 49
  • Update frequency: every 51.4 days
  • Top authors: Philipp-resmio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /5,026 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.42ms] Passed 4 tests

Analyzing server-side resources used by resmio button & widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.31 ▲3.30
Dashboard /wp-admin3.36 ▲0.0649.42 ▼5.03
Posts /wp-admin/edit.php3.41 ▲0.0649.46 ▲3.19
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.88 ▼15.12
Media Library /wp-admin/upload.php3.29 ▲0.0635.48 ▲4.57
resmio button and widget /wp-admin/options-general.php?page=resmio_btn_wdgt_page3.3135.50

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by resmio button & widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲8413.50 ▼0.801.85 ▼0.1846.81 ▲5.94
Dashboard /wp-admin2,236 ▲485.30 ▲0.43104.04 ▼12.6938.93 ▼7.86
Posts /wp-admin/edit.php2,121 ▲292.40 ▲0.3939.26 ▼0.4635.70 ▲2.07
Add New Post /wp-admin/post-new.php1,543 ▲2923.24 ▲5.75675.50 ▼14.1638.25 ▼16.13
Media Library /wp-admin/upload.php1,421 ▲334.62 ▲0.21105.83 ▼3.5344.49 ▼1.19
resmio button and widget /wp-admin/options-general.php?page=resmio_btn_wdgt_page1,4893.0060.3931.04

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/resmio-button-and-widget/templates/shortcodes.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/resmio-button-and-widget/resmio-btn-wdgt.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resmio-button-and-widget/templates/settings.php:2

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === resmio-button-and-widget === )
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

resmio-button-and-widget/resmio-btn-wdgt.php 85% from 13 tests

"resmio button & widget" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("resmio-button-and-widget.php" instead of "resmio-btn-wdgt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin607 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP33588370
PO File13131106
CSS12287
JavaScript411244

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.20
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/resmio-logo.png10.89KB4.47KB▼ 58.96%