72% findusat

Code Review | Find Us At

WordPress plugin Find Us At scored 72% from 54 tests.

About plugin

  • Plugin page: findusat
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-4.9
  • WordPress version: 6.3.1
  • First release: Sep 13, 2018
  • Latest release: Oct 15, 2018
  • Number of updates: 7
  • Update frequency: every 7.9 days
  • Top authors: hypertextstudios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼13.80ms] Passed 4 tests

An overview of server-side resources used by Find Us At
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0231.83 ▼12.72
Dashboard /wp-admin3.12 ▼0.1835.70 ▼16.06
Posts /wp-admin/edit.php3.26 ▼0.1037.06 ▼18.66
Add New Post /wp-admin/post-new.php5.50 ▼0.3892.95 ▼7.75
Media Library /wp-admin/upload.php3.21 ▼0.0229.53 ▼6.77
Find Us At /wp-admin/options-general.php?page=findusat3.1131.10
Locations /wp-admin/edit.php?post_type=location3.2435.64
Add New /wp-admin/post-new.php?post_type=location3.2959.53

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Find Us At
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,984 ▲19514.91 ▲1.6410.64 ▲8.7338.13 ▼8.98
Dashboard /wp-admin2,240 ▲345.91 ▲1.12114.73 ▲12.1343.12 ▲3.51
Posts /wp-admin/edit.php2,129 ▲402.72 ▲0.7647.15 ▲11.7334.72 ▲2.42
Add New Post /wp-admin/post-new.php1,566 ▲2418.95 ▲0.39605.24 ▼12.5735.01 ▼16.83
Media Library /wp-admin/upload.php1,431 ▲435.11 ▲0.69101.94 ▲1.0240.29 ▼2.85
Find Us At /wp-admin/options-general.php?page=findusat8212.5136.1933.60
Locations /wp-admin/edit.php?post_type=location1,0932.7145.1031.14
Add New /wp-admin/post-new.php?post_type=location2,2668.58177.4865.15

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

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=location
    • > Notice in wp-content/plugins/findusat/findusat.php+189
    Undefined variable: options

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× 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/findusat/include/findusat_admin_settings.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/findusat/include/findusat_admin_settings.php:66

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=location
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key&ver=1 208:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=location
    • > 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:28721 Uncaught Raa: Map: Expected mapDiv of type HTMLElement but was passed null.

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Convert the address of your location to coordinates for google maps), #2 (Display the map with your locations by use of a shimple shortcode)
The official readme.txt is a good inspiration

findusat/findusat.php Passed 13 tests

Analyzing the main PHP file in "Find Us At" version 1.2.1
104 characters long description:
Location of stores where your items can be found, and easily provide directions at the click of a button

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin358 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP25057239
JavaScript217799
CSS21020

PHP code Passed 2 tests

This is a very shot 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.15
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%
Functions15
▷ Named functions15100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.57MB with 0.39MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png363.02KB111.65KB▼ 69.24%
assets/screenshot-1.png222.35KB72.13KB▼ 67.56%