84% smooth-scroller

Code Review | Smooth Scroller

WordPress plugin Smooth Scroller scored 84% from 54 tests.

About plugin

  • Plugin page: smooth-scroller
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Sep 18, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: beek.yoshida (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 871 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.13ms] Passed 4 tests

This is a short check of server-side resources used by Smooth Scroller
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.09 ▲0.86
Dashboard /wp-admin3.35 ▲0.0445.33 ▼5.85
Posts /wp-admin/edit.php3.40 ▲0.0444.68 ▼4.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.73 ▲1.09
Media Library /wp-admin/upload.php3.27 ▲0.0436.60 ▲3.05
Smooth Scroller /wp-admin/plugins.php?page=smooth-scroller/beek-smooth-scroller.php3.2429.67

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Smooth Scroller
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲15813.62 ▼0.689.12 ▲7.5241.77 ▲0.74
Dashboard /wp-admin2,212 ▲245.85 ▼0.0595.25 ▼9.6738.17 ▼4.27
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0135.54 ▼4.2733.04 ▼3.88
Add New Post /wp-admin/post-new.php1,534 ▲118.20 ▼5.14602.01 ▼73.0753.69 ▼9.21
Media Library /wp-admin/upload.php1,394 ▲124.30 ▲0.14103.75 ▼26.3144.49 ▼14.14
Smooth Scroller /wp-admin/plugins.php?page=smooth-scroller/beek-smooth-scroller.php9212.0221.5831.13

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smooth-scroller/beek-smooth-scroller.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: scroll, smooth, plugin

smooth-scroller/beek-smooth-scroller.php 92% from 13 tests

The main PHP file in "Smooth Scroller" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smooth-scroller.php" instead of "beek-smooth-scroller.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
No dangerous file extensions were detected5,910 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
CSS32132,024
Sass1328241,520
LESS1328341,510
SVG100640
PHP13324133
PO File1222369
JavaScript10014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods555.56%
▷ Protected methods00.00%
▷ Private methods444.44%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin