83% oganro-reservation-widget

Code Review | XML Travel Portal Widget

WordPress plugin XML Travel Portal Widget scored83%from 54 tests.

About plugin

  • Plugin page: oganro-reservatio...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Aug 16, 2016
  • Number of updates: 106
  • Update frequency: every 7.5 days
  • Top authors: Oganro (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

90+ active /12,459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.01ms] Passed 4 tests

An overview of server-side resources used by XML Travel Portal Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.56 ▼1.66
Dashboard /wp-admin3.33 ▼0.0247.41 ▼13.09
Posts /wp-admin/edit.php3.38 ▲0.0242.39 ▼6.83
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.48 ▼18.44
Media Library /wp-admin/upload.php3.26 ▲0.0236.93 ▲1.46
Oganro-Reservation /wp-admin/options-general.php?page=ogn_rw_reservation_admin3.2634.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for XML Travel Portal Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▲0.031.77 ▲0.1543.54 ▲1.96
Dashboard /wp-admin2,199 ▲195.49 ▼0.1684.84 ▼0.1037.83 ▼2.75
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0735.73 ▼1.9033.71 ▼0.96
Add New Post /wp-admin/post-new.php1,531 ▼623.08 ▲4.99670.44 ▲59.6253.74 ▼12.28
Media Library /wp-admin/upload.php1,404 ▲44.16 ▼0.0594.80 ▼4.0645.18 ▲2.91
Oganro-Reservation /wp-admin/options-general.php?page=ogn_rw_reservation_admin1,6512.2338.8551.25

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=ogn_rw_reservation_admin
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:2740 Uncaught Error: cannot call methods on slider prior to initialization; attempted to call method 'value'

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #6 (All reservation box details can customize with admin panel)
You can look at the official readme.txt

oganro-reservation-widget/ogn-rw-reservation-widget.php 85% from 13 tests

The principal PHP file in "XML Travel Portal Widget" v. 2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("oganro-reservation-widget.php" instead of "ogn-rw-reservation-widget.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 plugin4,029 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript54191821,709
CSS4106571,418
PHP514942614
SVG100288

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-icons_cc0000_256x240.png3.67KB4.17KB0.00%
css/images/ui-icons_777620_256x240.png3.67KB4.17KB0.00%
css/img/ogn_rw_nights.png1.10KB1.17KB0.00%
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
css/images/ui-icons_ffffff_256x240.png3.67KB4.17KB0.00%