74% scroll-stop-google-maps

Code Review | Scroll Stop Google Maps

WordPress plugin Scroll Stop Google Maps scored74%from 54 tests.

About plugin

  • Plugin page: scroll-stop-googl...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Jul 20, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: jqrambo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /820 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.95MB] [CPU: ▼56.28ms] Passed 4 tests

A check of server-side resources used by Scroll Stop Google Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.413.81 ▼38.39
Dashboard /wp-admin2.07 ▼1.275.13 ▼54.89
Posts /wp-admin/edit.php2.08 ▼1.285.38 ▼41.78
Add New Post /wp-admin/post-new.php2.07 ▼3.825.04 ▼90.07
Media Library /wp-admin/upload.php2.07 ▼1.165.87 ▼29.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Scroll Stop Google Maps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17014.01 ▼0.745.48 ▲3.2940.61 ▼9.87
Dashboard /wp-admin2,210 ▲224.91 ▼0.04112.05 ▼7.2343.55 ▼3.30
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0336.94 ▲1.6734.59 ▼3.04
Add New Post /wp-admin/post-new.php1,518 ▼123.18 ▲0.20669.09 ▲5.2153.91 ▲7.53
Media Library /wp-admin/upload.php1,395 ▲74.13 ▼0.0899.45 ▲2.7740.99 ▼1.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the googlemaps-scroll-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/scroll-stop-google-maps/googlemaps-scroll.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: maps, scroll, google, stop

scroll-stop-google-maps/googlemaps-scroll.php 85% from 13 tests

The main file in "Scroll Stop Google Maps" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 194 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("scroll-stop-google-maps.php" instead of "googlemaps-scroll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin54 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS14029
PHP121914
JavaScript12011

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.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected