68% wp-auto-restaurant-finder

Code Review | WP Auto Restaurant Finder

WordPress plugin WP Auto Restaurant Finder scored68%from 54 tests.

About plugin

  • Plugin page: wp-auto-restauran...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.2.4
  • WordPress version: 6.3.1
  • First release: Jul 10, 2015
  • Latest release: Aug 8, 2015
  • Number of updates: 4
  • Update frequency: every 7.3 days
  • Top authors: lucia.intelisano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,579 total downloads

Benchmarks

Plugin footprint 65% 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.92MB] [CPU: ▼36.52ms] Passed 4 tests

Analyzing server-side resources used by WP Auto Restaurant Finder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.89 ▼1.41
Dashboard /wp-admin3.03 ▼0.3123.28 ▼42.00
Posts /wp-admin/edit.php3.04 ▼0.3226.50 ▼22.43
Add New Post /wp-admin/post-new.php3.03 ▼2.8526.24 ▼72.87
Media Library /wp-admin/upload.php3.03 ▼0.1922.74 ▼8.79
WP Auto Restaurant Finder /wp-admin/options-general.php?page=wp-auto-restaurant-finder/wp-auto-restaurant-finder.php3.0423.23

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Auto Restaurant Finder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.38 ▲0.031.56 ▼0.2741.33 ▲3.67
Dashboard /wp-admin2,199 ▲185.57 ▼0.0790.48 ▼12.4736.71 ▼5.71
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0438.38 ▼0.3336.97 ▲2.26
Add New Post /wp-admin/post-new.php1,531 ▲522.98 ▲0.21674.65 ▲45.7546.40 ▼6.87
Media Library /wp-admin/upload.php1,404 ▲104.18 ▼0.0197.62 ▲2.3340.11 ▼0.02
WP Auto Restaurant Finder /wp-admin/options-general.php?page=wp-auto-restaurant-finder/wp-auto-restaurant-finder.php9122.0022.9626.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp-auto-restaurant-finder/wp-auto-restaurant-finder.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-auto-restaurant-finder/wp-auto-restaurant-finder.php:109

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 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 50 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #1, #2 in wp-auto-restaurant-finder/assets to your readme.txt
The official readme.txt might help

wp-auto-restaurant-finder/wp-auto-restaurant-finder.php Passed 13 tests

The entry point to "WP Auto Restaurant Finder" version 1.0.0 is a PHP file that has certain tags in its header comment area
66 characters long description:
A plugin to get/find Restaurants on google maps in a very easy way

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
Success! There were no dangerous files found in this plugin705 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111743306
PHP15332205
CSS1240152
HTML110042

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions10
▷ Named functions10100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/pin.png3.34KB1.85KB▼ 44.62%