74% softinn-check-availability-widget

Code Review | Softinn Check Availability Widget

WordPress plugin Softinn Check Availability Widget scored74%from 54 tests.

About plugin

  • Plugin page: softinn-check-ava...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.0
  • WordPress version: 6.3.1
  • First release: Apr 25, 2014
  • Latest release: Apr 25, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: dearon teh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /643 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

An overview of server-side resources used by Softinn Check Availability Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.91 ▼31.93
Dashboard /wp-admin2.29 ▼1.0111.46 ▼43.26
Posts /wp-admin/edit.php2.29 ▼1.069.81 ▼39.46
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.88 ▼81.67
Media Library /wp-admin/upload.php2.29 ▼0.9412.41 ▼24.07

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_softinnroombookingsystem
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Softinn Check Availability Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.121.83 ▲0.1144.25 ▼0.29
Dashboard /wp-admin2,195 ▲185.61 ▼0.0388.37 ▼11.1836.77 ▼4.97
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0135.74 ▼5.6634.27 ▼4.67
Add New Post /wp-admin/post-new.php1,526 ▼022.89 ▼0.18675.84 ▲6.5851.24 ▼2.55
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.0296.05 ▼8.3344.30 ▲0.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SoftinnRoomBookingSystem is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_softinnroombookingsystem
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/softinn-check-availability-widget/RoomBooking.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/softinn-check-availability-widget/RoomBooking.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: widget

softinn-check-availability-widget/SoftinnWidget.php 92% from 13 tests

"Softinn Check Availability Widget" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("softinn-check-availability-widget.php" instead of "SoftinnWidget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected51 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2984051

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected