78% fusion-retailers

Code Review | Google Maps Retailers

WordPress plugin Google Maps Retailers scored78%from 54 tests.

About plugin

  • Plugin page: fusion-retailers
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2013
  • Latest release: Feb 23, 2015
  • Number of updates: 13
  • Update frequency: every 52.6 days
  • Top authors: cmmarslender (69.23%)graphicfusion (38.46%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,951 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.63MB] [CPU: ▼14.98ms] Passed 4 tests

This is a short check of server-side resources used by Google Maps Retailers
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0751.37 ▲10.98
Dashboard /wp-admin3.37 ▲0.0345.51 ▼8.78
Posts /wp-admin/edit.php3.42 ▲0.0653.87 ▲12.67
Add New Post /wp-admin/post-new.php3.20 ▼2.6833.16 ▼65.43
Media Library /wp-admin/upload.php3.29 ▲0.0636.75 ▲3.32
Retailer Settings /wp-admin/edit.php?post_type=retailer&page=retailer_settings_page3.2631.83
All Retailers /wp-admin/edit.php?post_type=retailer3.3436.27
Add New /wp-admin/post-new.php?post_type=retailer3.1526.21

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
fusion_states_settings
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google Maps Retailers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲24815.01 ▲0.6630.31 ▲28.1741.90 ▼3.14
Dashboard /wp-admin2,245 ▲715.88 ▲0.2492.25 ▲8.6037.75 ▼0.16
Posts /wp-admin/edit.php2,155 ▲552.29 ▲0.3139.94 ▼1.2634.77 ▼0.95
Add New Post /wp-admin/post-new.php1,566 ▲4023.28 ▲0.10674.71 ▲41.6235.24 ▼24.52
Media Library /wp-admin/upload.php1,453 ▲534.42 ▲0.2897.93 ▼1.3341.91 ▼1.43
Retailer Settings /wp-admin/edit.php?post_type=retailer&page=retailer_settings_page6,4674.04243.4832.82
All Retailers /wp-admin/edit.php?post_type=retailer1,1222.2134.8728.80
Add New /wp-admin/post-new.php?post_type=retailer1,9422.7857.4229.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • fusion_states_settings
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=retailer
    • > Notice in wp-content/plugins/fusion-retailers/fusion_retailers_metaboxes.php+19
    Undefined index: post_type
  • 50 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=retailer
    • > Warning in wp-content/plugins/fusion-retailers/fusion_retailers_metaboxes.php+64
    in_array() expects parameter 2 to be array, string given

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fusion-retailers/fusion_retailers_metaboxes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/fusion-retailers/fusion_retailers.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: retail, retailers, store locator, map, google map...

fusion-retailers/fusion_retailers.php 92% from 13 tests

The main PHP script in "Google Maps Retailers" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fusion-retailers.php" instead of "fusion_retailers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,276 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
XML2406,946
PHP23125278
JavaScript23044
CSS1107
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin