84% azexo-store-locator

Code Review | AZEXO Store Locator

WordPress plugin AZEXO Store Locator scored 84% from 54 tests.

About plugin

  • Plugin page: azexo-store-locator
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 5.8.1
  • First release: Feb 5, 2020
  • Latest release: Jun 22, 2020
  • Number of updates: 48
  • Update frequency: every 2.9 days
  • Top authors: azexo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 494 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by AZEXO Store Locator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.22 ▲0.5038.40 ▲15.39
Dashboard /wp-admin3.17 ▲0.1239.42 ▼4.34
Posts /wp-admin/edit.php3.22 ▲0.1144.03 ▲3.79
Add New Post /wp-admin/post-new.php5.47 ▲0.0386.84 ▼566.37
Media Library /wp-admin/upload.php3.05 ▲0.0533.84 ▲0.65

Server storage [IO: ▲2.37MB] [DB: ▲0.04MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 76 new files
Database: no new tables, 3 new options
New WordPress options
azt-settings
azt-item-fields
azt-demo-imported

Browser metrics Passed 4 tests

Checking browser requirements for AZEXO Store Locator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,946 ▲35018.82 ▲3.2862.14 ▲51.7759.77 ▲9.63
Dashboard /wp-admin2,992 ▲556.00 ▲0.03137.54 ▼9.3645.00 ▼73.27
Posts /wp-admin/edit.php2,758 ▲192.71 ▼0.0164.83 ▼1.6341.69 ▼48.86
Add New Post /wp-admin/post-new.php1,519 ▼9618.66 ▼2.74384.85 ▲119.7169.31 ▼39.88
Media Library /wp-admin/upload.php1,832 ▲255.01 ▼0.03146.59 ▼0.9372.84 ▼44.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 3 options in the database
    • azt-demo-imported
    • azt-item-fields
    • azt-settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/azexo-store-locator/azexo-store-locator.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/azexo-store-locator/tgm/class-tgm-plugin-activation.php:2101
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/azexo-store-locator/azh.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/azexo-store-locator/dashboard.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: store finder, store locator, locations, stores, braches

azexo-store-locator/azexo-store-locator.php 92% from 13 tests

"AZEXO Store Locator" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin37,878 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript123,7768,62319,740
LESS61752496,419
PO File171,4491,9934,842
PHP57722,2574,004
CSS536171,247
Markdown41850778
JSON200430
HTML100418

PHP code Passed 2 tests

Analyzing 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.51
Average class complexity73.67
▷ Minimum class complexity1.00
▷ Maximum class complexity204.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods185
▷ Static methods63.24%
▷ Public methods14779.46%
▷ Protected methods3820.54%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants30
▷ Global constants2790.00%
▷ Class constants310.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin