83% hotels-airbnb-map

Code Review | Hotels & Airbnbs Map

WordPress plugin Hotels & Airbnbs Map scored83%from 54 tests.

About plugin

  • Plugin page: hotels-airbnb-map
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Jul 9, 2019
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: stay22 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /1,184 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
Installer ran successfully

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

A check of server-side resources used by Hotels & Airbnbs Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.26 ▼5.95
Dashboard /wp-admin3.32 ▲0.0251.79 ▼2.50
Posts /wp-admin/edit.php3.37 ▲0.0151.71 ▲0.42
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.73 ▼10.94
Media Library /wp-admin/upload.php3.24 ▲0.0138.27 ▲5.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Hotels & Airbnbs Map
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.35 ▼0.371.73 ▼0.4446.39 ▲1.54
Dashboard /wp-admin2,207 ▲304.86 ▼0.6888.45 ▼11.4642.51 ▲0.88
Posts /wp-admin/edit.php2,118 ▲152.51 ▲0.3634.90 ▼10.2532.42 ▼9.74
Add New Post /wp-admin/post-new.php1,540 ▲223.11 ▲5.26677.17 ▲36.5837.91 ▼36.38
Media Library /wp-admin/upload.php1,415 ▲124.55 ▲0.3394.84 ▼5.7743.35 ▲0.39

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_stay22_map_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hotels-airbnb-map/includes/map-scripts.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hotels-airbnb-map/includes/map-class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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 your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

hotels-airbnb-map/hotels-and-airbnbs-map.php 77% from 13 tests

The principal PHP file in "Hotels & Airbnbs Map" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hotels-airbnb-map.php" instead of "hotels-and-airbnbs-map.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,930 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript46163092,993
CSS211329775
PHP34787162

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin