10% storelocator-metizsoft

Code Review | StoreLocator Metizsoft for wordpress

WordPress plugin StoreLocator Metizsoft for wordpress scored10%from 54 tests.

About plugin

  • Plugin page: storelocator-meti...
  • Plugin version: 1.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9
  • WordPress version: 6.3.1
  • First release: Mar 8, 2022
  • Latest release: Mar 8, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: metizsoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /199 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.15ms] Passed 4 tests

A check of server-side resources used by StoreLocator Metizsoft for wordpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.87 ▼4.15
Dashboard /wp-admin3.32 ▲0.0145.15 ▼1.55
Posts /wp-admin/edit.php3.37 ▲0.0146.33 ▼4.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.33 ▼13.02
Media Library /wp-admin/upload.php3.24 ▲0.0134.08 ▼2.92

Server storage [IO: ▲1.99MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

StoreLocator Metizsoft for wordpress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲22918.39 ▲4.0113.33 ▲11.4142.83 ▼5.78
Dashboard /wp-admin2,233 ▲476.97 ▲2.04121.51 ▲9.3884.33 ▲40.03
Posts /wp-admin/edit.php2,119 ▲303.71 ▲1.6549.69 ▲13.4836.35 ▲2.22
Add New Post /wp-admin/post-new.php1,543 ▲1024.47 ▲1.33660.83 ▼33.3036.62 ▼31.42
Media Library /wp-admin/upload.php1,415 ▲306.96 ▲2.73112.40 ▲14.3394.88 ▲49.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/storelocator-metizsoft/index.php+78
    Undefined variable: name
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/storelocator-metizsoft/includes/shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/storelocator-metizsoft/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/storelocator-metizsoft/views/home.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/storelocator-metizsoft/includes/errors.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/storelocator-metizsoft/config.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Activate Plugin.), #2 (Connect to the storelocator.)
You can look at the official readme.txt

storelocator-metizsoft/index.php 85% from 13 tests

The principal PHP file in "StoreLocator Metizsoft for wordpress" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("storelocator-metizsoft.php" instead of "index.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected18,530 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS716,4734516,808
JavaScript8101551,518
PHP57313204

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assest/image/store_locator_loader.png10.69KB2.79KB▼ 73.89%
images/store-2.png0.85KB0.66KB▼ 21.86%
images/Store-1.png1.33KB0.87KB▼ 34.41%
images/Store.png0.91KB0.48KB▼ 47.00%