78% back-to-top-up

Code Review | Back to top-up

WordPress plugin Back to top-up scored78%from 54 tests.

About plugin

  • Plugin page: back-to-top-up
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 11, 2020
  • Latest release: Aug 7, 2020
  • Number of updates: 4
  • Update frequency: every 7.0 days
  • Top authors: lusine2000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /948 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.12ms] Passed 4 tests

An overview of server-side resources used by Back to top-up
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.25 ▲2.44
Dashboard /wp-admin3.38 ▲0.0461.31 ▼4.82
Posts /wp-admin/edit.php3.50 ▲0.1451.94 ▲1.39
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.95 ▼18.97
Media Library /wp-admin/upload.php3.29 ▲0.0637.42 ▲1.93
All Scrolls /wp-admin/edit.php?post_type=wstr3.3641.20
Add New Scroll /wp-admin/post-new.php?post_type=wstr3.3949.82

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Back to top-up
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,045 ▲28414.72 ▲0.455.43 ▲3.7542.74 ▼0.59
Dashboard /wp-admin2,362 ▲1826.17 ▲0.46107.94 ▲20.4537.57 ▼3.32
Posts /wp-admin/edit.php2,296 ▲1963.30 ▲1.2951.41 ▲13.8734.79 ▼1.23
Add New Post /wp-admin/post-new.php1,560 ▲3222.94 ▼0.11671.14 ▲0.4038.02 ▼11.93
Media Library /wp-admin/upload.php1,433 ▲334.14 ▼0.1378.79 ▼29.3843.23 ▼5.43
All Scrolls /wp-admin/edit.php?post_type=wstr1,2693.3144.4827.58
Add New Scroll /wp-admin/post-new.php?post_type=wstr2,0483.7461.2887.37

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 | 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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/back-to-top-up/admin/admin_page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/back-to-top-up/roll.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/back-to-top-up/admin/admin_page_post.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wstr
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=wstr 357 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: The official readme.txt might help

back-to-top-up/roll.php 92% from 13 tests

The main PHP script in "Back to top-up" version 1.0.2 is automatically included on every request by WordPress
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 ("back-to-top-up.php" instead of "roll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin28 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP74623
JavaScript3003
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods733.33%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.38MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/scroll_up_12.png17.13KB7.59KB▼ 55.68%
images/scroll_up_6.png3.30KB3.23KB▼ 2.25%
(invalid) images/scroll_up_11.png109.63KB0.00KB▼ 100.00%
images/scroll_up_13.png15.49KB16.33KB0.00%
images/scroll_up_9.png7.26KB4.76KB▼ 34.43%