73% wp-nearby-places-basic

Code Review | WP Nearby Places Basic

WordPress plugin WP Nearby Places Basic scored73%from 54 tests.

About plugin

  • Plugin page: wp-nearby-places-...
  • Plugin version: 1.9
  • PHP compatiblity: 5.2.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 2, 2018
  • Latest release: Nov 8, 2021
  • Number of updates: 137
  • Update frequency: every 9.2 days
  • Top authors: alharlow (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /4,698 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.80ms] Passed 4 tests

Analyzing server-side resources used by WP Nearby Places Basic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0421.57 ▼19.25
Dashboard /wp-admin3.45 ▲0.1552.70 ▼2.63
Posts /wp-admin/edit.php3.57 ▲0.2153.24 ▲1.33
Add New Post /wp-admin/post-new.php6.03 ▲0.1485.90 ▼16.40
Media Library /wp-admin/upload.php3.35 ▲0.1235.84 ▼0.91
Settings /wp-admin/admin.php?page=mynearbyplaces_settings3.4037.60
WP Nearby Places /wp-admin/admin.php?page=mynearbyplaces_settings_page3.3659.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: 2 new tables, 6 new options
New tables
wp_mynearbyplaces_sub_category
wp_mynearbyplaces_category
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Nearby Places Basic
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,164 ▲40315.95 ▲1.6022.74 ▲20.9048.63 ▲4.34
Dashboard /wp-admin2,420 ▲2466.31 ▲0.65109.62 ▲9.3594.34 ▲48.37
Posts /wp-admin/edit.php2,352 ▲2493.60 ▲1.5851.39 ▲10.0671.19 ▲36.13
Add New Post /wp-admin/post-new.php1,594 ▲6823.27 ▲0.08651.79 ▼21.2437.19 ▼16.78
Media Library /wp-admin/upload.php1,485 ▲854.25 ▲0.0786.64 ▼44.9581.39 ▲20.80
Settings /wp-admin/admin.php?page=mynearbyplaces_settings1,94911.07334.4098.85
WP Nearby Places /wp-admin/admin.php?page=mynearbyplaces_settings_page2,31413.93419.8687.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_mynearbyplaces_category
    • wp_mynearbyplaces_sub_category
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mynearbyplaces_settings
    • > Warning in wp-content/plugins/wp-nearby-places-basic/nearbyplaces.php+429
    Use of undefined constant RSSFI_TEXT - assumed 'RSSFI_TEXT' (this will throw an Error in a future version of PHP)

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires at least: Version format is invalid
  • Screenshots: Add images for these screenshots: #1 (Installed Plugin displays here - trunk/images/screenshot-1.jpg), #2 (Plugin Settings Window - trunk/images/screenshot-2.jpg)
The official readme.txt is a good inspiration

wp-nearby-places-basic/nearbyplaces.php 92% from 13 tests

"WP Nearby Places Basic" version 1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-nearby-places-basic.php" instead of "nearbyplaces.php")

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
Everything looks great! No dangerous files found in this plugin3,501 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45011,0782,430
PHP415944809
CSS3575262

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.37MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upgrade_to_pro.png37.65KB11.93KB▼ 68.31%
images/no-image.png2.68KB1.62KB▼ 39.55%
images/clusterpin.png1.72KB1.07KB▼ 37.82%
images/featureimage4.png68.96KB23.86KB▼ 65.40%
images/help.png2.01KB1.14KB▼ 43.38%