78% smooth-locations

Code Review | Smooth Locations

WordPress plugin Smooth Locations scored78%from 54 tests.

About plugin

  • Plugin page: smooth-locations
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2013
  • Latest release: Jun 12, 2013
  • Number of updates: 6
  • Update frequency: every 11.3 days
  • Top authors: Brainstorm IT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,069 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Smooth Locations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0935.61 ▼4.49
Dashboard /wp-admin3.39 ▲0.0543.43 ▼15.24
Posts /wp-admin/edit.php3.44 ▲0.0946.80 ▼1.35
Add New Post /wp-admin/post-new.php5.97 ▲0.0983.90 ▼11.91
Media Library /wp-admin/upload.php3.32 ▲0.0937.55 ▲3.62
Locations /wp-admin/edit.php?post_type=smooth_location3.3633.63
Add New /wp-admin/post-new.php?post_type=smooth_location3.3544.12

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smooth Locations
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8614.47 ▲0.171.87 ▲0.2040.43 ▼2.72
Dashboard /wp-admin2,236 ▲514.82 ▼1.02112.97 ▲8.3643.47 ▼0.58
Posts /wp-admin/edit.php2,119 ▲302.02 ▼0.0039.04 ▼4.3635.59 ▼5.30
Add New Post /wp-admin/post-new.php1,556 ▲2323.26 ▼0.27644.75 ▲10.7751.11 ▼2.00
Media Library /wp-admin/upload.php1,418 ▲304.24 ▼0.01101.61 ▲0.9942.30 ▲0.54
Locations /wp-admin/edit.php?post_type=smooth_location1,0771.9935.7732.10
Add New /wp-admin/post-new.php?post_type=smooth_location1,5023.4568.6149.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • bit_smooth_locations_version
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/smooth-locations/smooth_locations.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=smooth_location
    • > Network (severe)
    wp-content/plugins/smooth-locations/js/smooth_locations_admin.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=smooth_location
    • > Console-api (warning) in unknown
    http://maps.google.com/maps/api/js?sensor=true 210: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 93% 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
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

smooth-locations/smooth_locations.php 92% from 13 tests

Analyzing the main PHP file in "Smooth Locations" version 1.1
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smooth-locations.php" instead of "smooth_locations.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 plugin361 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13636223
JavaScript2232136
CSS1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
No PNG images were found in this plugin