73% wp-store-locator-extenders

Code Review | WP Store Locator - Extenders

WordPress plugin WP Store Locator - Extenders scored73%from 54 tests.

About plugin

  • Plugin page: wp-store-locator-...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2020
  • Latest release: Jan 3, 2023
  • Number of updates: 23
  • Update frequency: every 33.7 days
  • Top authors: DeBAAT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,257 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▼1.17ms] Passed 4 tests

Analyzing server-side resources used by WP Store Locator - Extenders
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6243.76 ▲1.28
Dashboard /wp-admin3.93 ▲0.6249.10 ▼1.32
Posts /wp-admin/edit.php3.98 ▲0.6259.51 ▲9.60
Add New Post /wp-admin/post-new.php6.44 ▲0.5690.96 ▼8.24
Media Library /wp-admin/upload.php3.84 ▲0.6240.21 ▲3.59
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius4.0543.13

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 401 new files
Database: no new tables, 10 new options
New WordPress options
fs_gdpr
theysaidso_admin_options
fs_active_plugins
widget_theysaidso_widget
widget_recent-comments
db_upgraded
fs_debug_mode
widget_recent-posts
can_compress_scripts
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by WP Store Locator - Extenders
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5214.68 ▼0.051.73 ▼0.0230.48 ▼13.59
Dashboard /wp-admin2,219 ▲415.65 ▼0.0484.75 ▼34.1243.43 ▲1.36
Posts /wp-admin/edit.php2,127 ▲272.16 ▲0.1539.67 ▲1.7239.00 ▲4.63
Add New Post /wp-admin/post-new.php1,546 ▲1922.97 ▼0.26660.05 ▼13.7164.04 ▲6.73
Media Library /wp-admin/upload.php1,418 ▲214.18 ▼0.03100.06 ▼11.7545.41 ▼4.32
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0851.6828.2229.10

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-store-locator-extenders/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • fs_accounts
    • fs_active_plugins
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • fs_gdpr
    • widget_recent-posts
    • fs_debug_mode
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-store-locator-extenders/include/wpsl-extenders-upgrade.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-store-locator-extenders/templates/ext-default.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-store-locator-extenders/templates/ext-store-listings-below.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'DebugMyPluginPanel' not found in wp-content/plugins/wp-store-locator-extenders/include/class.dmppanels.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpsl_ext_maybe_define_constant() in wp-content/plugins/wp-store-locator-extenders/include/class-WPSL_Extenders.php:4

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, but this is not an exhaustive test

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
These attributes need your attention: You can look at the official readme.txt

wp-store-locator-extenders/wp-store-locator-extenders.php Passed 13 tests

The principal PHP file in "WP Store Locator - Extenders" v. 1.3.2 is loaded by WordPress automatically on each request
16 characters long description:
Manage the users

Code Analysis 97% from 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 detected38,965 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1338,44518,35134,929
JavaScript73582112,705
CSS1711650740
PO File1267361591

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity80.72
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods1,362
▷ Static methods19214.10%
▷ Public methods97671.66%
▷ Protected methods181.32%
▷ Private methods36827.02%
Functions121
▷ Named functions121100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.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
191 PNG files occupy 0.57MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/event-icons/Turn off.png3.33KB2.15KB▼ 35.54%
images/event-icons/House.png3.00KB1.78KB▼ 40.58%
images/event-icons/Knowledge.png2.54KB1.95KB▼ 23.37%
images/event-icons/Business.png4.36KB2.38KB▼ 45.35%
images/event-icons/Yin-yan.png2.42KB2.18KB▼ 9.81%