10% inn-style-widget

Code Review | Inn Style Widget

WordPress plugin Inn Style Widget scored 10% from 54 tests.

About plugin

  • Plugin page: inn-style-widget
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9
  • WordPress version: 6.3.1
  • First release: Sep 6, 2013
  • Latest release: Jul 18, 2014
  • Number of updates: 17
  • Update frequency: every 18.5 days
  • Top authors: iantearle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,061 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/inn-style-widget/inn-style-widget.php+402
    Methods with the same name as their class will not be constructors in a future version of PHP; INNSTYLE_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼47.97ms] Passed 4 tests

Server-side resources used by Inn Style Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1811.40 ▼25.39
Dashboard /wp-admin2.30 ▼1.019.43 ▼40.42
Posts /wp-admin/edit.php2.30 ▼1.0612.27 ▼41.99
Add New Post /wp-admin/post-new.php2.30 ▼3.5915.28 ▼82.49
Media Library /wp-admin/upload.php2.30 ▼0.9310.24 ▼26.97
InnStyle Import /wp-admin/tools.php?page=innstyle-bookables2.3011.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_inn-style-widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Inn Style Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7213.27 ▼0.924.52 ▲2.6946.12 ▼0.02
Dashboard /wp-admin2,221 ▲365.87 ▼0.12111.44 ▼38.8642.73 ▼27.34
Posts /wp-admin/edit.php2,086 ▼32.01 ▼0.1347.27 ▲7.0833.45 ▼10.96
Add New Post /wp-admin/post-new.php1,539 ▲2023.11 ▲0.01724.30 ▲27.9458.77 ▲5.90
Media Library /wp-admin/upload.php1,403 ▲154.18 ▼0.02114.32 ▲2.2246.81 ▼10.71
InnStyle Import /wp-admin/tools.php?page=innstyle-bookables7822.0526.7825.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in INNSTYLE_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_inn-style-widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in INNSTYLE_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > Notice in wp-content/plugins/inn-style-widget/inn-style-widget.php+169
    Trying to access array offset on value of type int
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > Notice in wp-content/plugins/inn-style-widget/inn-style-widget.php+179
    Trying to get property 'images' of non-object
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > Notice in wp-content/plugins/inn-style-widget/inn-style-widget.php+180
    Trying to get property 'bookables' of non-object
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > Warning in wp-content/plugins/inn-style-widget/inn-style-widget.php+261
    count(): Parameter must be an array or an object that implements Countable

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inn-style-widget/inn-style-widget.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/tools.php?page=innstyle-bookables
    • > Network (severe)
    wp-content/themes/twentytwentyone/images/cpt-icons/mask.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === inn-style-widget === )
You can take inspiration from this readme.txt

inn-style-widget/inn-style-widget.php Passed 13 tests

The entry point to "Inn Style Widget" version 0.5 is a PHP file that has certain tags in its header comment area
104 characters long description:
Inn Style Widget for showing availabilities, calendar and bookables (rooms) on your hotel or B&B website

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
Good job! No executable or dangerous file extensions detected1,106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11728683
PHP110169423

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity16.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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin