83% sinm-scroll-to-top

Code Review | SINM Scroll To Top

WordPress plugin SINM Scroll To Top scored83%from 54 tests.

About plugin

  • Plugin page: sinm-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Jan 9, 2015
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: SINM (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /755 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.00MB] [CPU: ▼0.51ms] Passed 4 tests

A check of server-side resources used by SINM Scroll To Top
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.49 ▼5.09
Dashboard /wp-admin3.31 ▲0.0145.22 ▼2.47
Posts /wp-admin/edit.php3.36 ▲0.0048.17 ▲4.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.14 ▲2.47
Media Library /wp-admin/upload.php3.23 ▲0.0036.06 ▲3.06

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

SINM Scroll To Top: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.76 ▼0.605.63 ▲3.8638.35 ▼8.70
Dashboard /wp-admin2,207 ▲195.89 ▲0.99109.79 ▼6.0742.03 ▼2.30
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0541.12 ▲6.0536.08 ▼1.18
Add New Post /wp-admin/post-new.php1,520 ▼1023.08 ▲4.68587.51 ▼20.6154.22 ▼1.20
Media Library /wp-admin/upload.php1,395 ▲74.26 ▲0.0694.35 ▼4.8443.95 ▲1.97

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 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/sinm-scroll-to-top/sinm.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

sinm-scroll-to-top/sinm.php 85% from 13 tests

Analyzing the main PHP file in "SINM Scroll To Top" version 1.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sinm-scroll-to-top.php" instead of "sinm.php")
  • Description: The description should be shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin33 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP191221
CSS1008
JavaScript28234

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/img/new.png4.35KB2.06KB▼ 52.57%