10% top-button

Code Review | Top But(ton)

WordPress plugin Top But(ton) scored 10% from 54 tests.

About plugin

  • Plugin page: top-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2017
  • Latest release: Aug 28, 2017
  • Number of updates: 3
  • Update frequency: every 25.7 days
  • Top authors: vodrems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 555 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/top-button/index.php+104
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.41ms] Passed 4 tests

An overview of server-side resources used by Top But(ton)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.91 ▲3.72
Dashboard /wp-admin3.31 ▲0.0046.60 ▼1.29
Posts /wp-admin/edit.php3.36 ▲0.0047.71 ▲0.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.30 ▼5.08
Media Library /wp-admin/upload.php3.23 ▲0.0034.28 ▲0.19

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] 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
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Top But(ton)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.591.83 ▼0.0443.37 ▼0.10
Dashboard /wp-admin2,203 ▲184.87 ▲0.0399.36 ▼7.3940.57 ▼2.04
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0438.94 ▲4.0837.97 ▲2.05
Add New Post /wp-admin/post-new.php1,542 ▲1118.24 ▼5.26596.41 ▲2.5368.49 ▲13.54
Media Library /wp-admin/upload.php1,391 ▲124.21 ▼0.0296.28 ▼2.8241.69 ▲0.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/top-button/index.php on line 104

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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: button, top button, scroll

top-button/index.php 92% from 13 tests

This is the main PHP file of "Top But(ton)" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("top-button.php" instead of "index.php")

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 plugin121 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1241070
CSS12138
JavaScript15013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/up_small.png1.08KB0.39KB▼ 64.23%
assets/images/up.png1.14KB0.51KB▼ 55.26%