78% nearby-now

Code Review | Nearby Now Reviews and Audio Testimonials

WordPress plugin Nearby Now Reviews and Audio Testimonials scored78%from 54 tests.

About plugin

  • Plugin page: nearby-now
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2012
  • Latest release: Apr 3, 2023
  • Number of updates: 90
  • Update frequency: every 45.3 days
  • Top authors: azcoov (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /28,186 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.49ms] Passed 4 tests

A check of server-side resources used by Nearby Now Reviews and Audio Testimonials
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.64 ▲1.81
Dashboard /wp-admin3.40 ▲0.0646.09 ▼12.56
Posts /wp-admin/edit.php3.51 ▲0.1643.93 ▼0.33
Add New Post /wp-admin/post-new.php5.98 ▲0.1081.78 ▼5.49
Media Library /wp-admin/upload.php3.32 ▲0.1036.11 ▲0.41
Nearby Now /wp-admin/options-general.php?page=NearbyNow3.2629.47

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Nearby Now Reviews and Audio Testimonials
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.59 ▼0.791.63 ▼0.6643.71 ▼2.11
Dashboard /wp-admin2,210 ▲225.77 ▼0.0599.08 ▼1.6239.85 ▼1.66
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0234.13 ▼0.1534.66 ▼5.25
Add New Post /wp-admin/post-new.php1,536 ▲323.51 ▲0.42588.21 ▼48.7552.69 ▼16.28
Media Library /wp-admin/upload.php1,389 ▲44.16 ▼0.0394.34 ▼9.2642.20 ▼0.48
Nearby Now /wp-admin/options-general.php?page=NearbyNow8112.0224.5827.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=NearbyNow
    • > Notice in wp-content/plugins/nearby-now/main.php+591
    Trying to access array offset on value of type bool

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nearby-now/main.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === nearby-now === )
You can look at the official readme.txt

nearby-now/main.php 92% from 13 tests

The main PHP script in "Nearby Now Reviews and Audio Testimonials" version 2.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("nearby-now.php" instead of "main.php")

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
No dangerous file extensions were detected497 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18831497

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.33
Average class complexity77.00
▷ Minimum class complexity77.00
▷ Maximum class complexity77.00
Average method complexity5.22
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.58MB with 0.40MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png292.46KB98.53KB▼ 66.31%
screenshot-2.png303.04KB91.32KB▼ 69.87%