78% stellar-places

Code Review | Stellar Places

WordPress plugin Stellar Places scored78%from 54 tests.

About plugin

  • Plugin page: stellar-places
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Jul 28, 2014
  • Latest release: Dec 13, 2020
  • Number of updates: 23
  • Update frequency: every 102.8 days
  • Top authors: wpscholar (43.48%)woodent (34.78%)stellariffic (30.43%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /8,767 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.30MB] [CPU: ▼7.59ms] Passed 4 tests

A check of server-side resources used by Stellar Places
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2440.68 ▲1.57
Dashboard /wp-admin3.66 ▲0.3247.29 ▼13.57
Posts /wp-admin/edit.php3.72 ▲0.3652.65 ▲10.47
Add New Post /wp-admin/post-new.php6.28 ▲0.3984.54 ▼15.61
Media Library /wp-admin/upload.php3.52 ▲0.2937.32 ▼2.75
Places /wp-admin/edit.php?post_type=stlr_place3.6338.02
Location Categories /wp-admin/edit-tags.php?taxonomy=stlr_location_categories&post_type=stlr_place3.5236.74
Add New /wp-admin/post-new.php?post_type=stlr_place6.2982.72
Settings /wp-admin/edit.php?post_type=stlr_place&page=stellar-places-settings3.4934.30

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 62 new files
Database: no new tables, 7 new options
New WordPress options
stellar_places_version
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Stellar Places
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11714.44 ▲0.121.96 ▲0.2440.32 ▼4.75
Dashboard /wp-admin2,241 ▲535.91 ▲0.05108.37 ▼0.8139.68 ▼4.68
Posts /wp-admin/edit.php2,124 ▲352.00 ▼0.0440.97 ▼0.1435.00 ▼3.41
Add New Post /wp-admin/post-new.php1,565 ▲4623.12 ▼0.20657.21 ▼4.5759.94 ▲7.21
Media Library /wp-admin/upload.php1,423 ▲414.19 ▲0.07105.57 ▲2.9545.91 ▲5.67
Places /wp-admin/edit.php?post_type=stlr_place1,1051.9530.4628.55
Location Categories /wp-admin/edit-tags.php?taxonomy=stlr_location_categories&post_type=stlr_place3,1442.1648.4251.77
Add New /wp-admin/post-new.php?post_type=stlr_place7,13323.47911.3367.02
Settings /wp-admin/edit.php?post_type=stlr_place&page=stellar-places-settings2,6652.2847.1635.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 7 options in the database
    • stellar_places_version
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stellar-places/includes/upgrades/1.0.4.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stellar_Places' not found in wp-content/plugins/stellar-places/includes/templates/archive.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/stellar-places/includes/init.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/stellar-places/includes/support/views/icon-picker.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/stellar-places/includes/queries/places-query.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stellar-places/includes/upgrades/1.0.2.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stellar_Places' not found in wp-content/plugins/stellar-places/includes/templates/single.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/stellar-places/includes/support/views/location.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=stlr_place
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&ver=1.3 234: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"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === stellar-places === )
The official readme.txt might help

stellar-places/stellar-places.php 85% from 13 tests

This is the main PHP file of "Stellar Places" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin3,593 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP394911,3992,339
JavaScript485183528
PO File295497512
CSS2183890
JSON10078
HTML117046

PHP code Passed 2 tests

An overview 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.31
Average class complexity9.77
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes13.85%
Methods162
▷ Static methods6942.59%
▷ Public methods15595.68%
▷ Protected methods63.70%
▷ Private methods10.62%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected