84% cudazi-scroll-to-top

Code Review | Cudazi Scroll to Top

WordPress plugin Cudazi Scroll to Top scored84%from 54 tests.

About plugin

  • Plugin page: cudazi-scroll-to-top
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2012
  • Latest release: Jan 19, 2012
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: cudazi (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /20,089 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.35MB] [CPU: ▼11.06ms] Passed 4 tests

This is a short check of server-side resources used by Cudazi Scroll to Top
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.96 ▼35.49
Dashboard /wp-admin3.32 ▲0.0155.60 ▲1.40
Posts /wp-admin/edit.php3.37 ▲0.0153.23 ▲3.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.51 ▼6.45
Media Library /wp-admin/upload.php3.24 ▲0.0134.66 ▼3.70

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Cudazi Scroll to Top: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲16913.65 ▼0.585.78 ▲3.7648.50 ▲6.82
Dashboard /wp-admin2,221 ▲185.84 ▲0.91101.58 ▼6.7139.64 ▼5.15
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0240.14 ▼3.4540.67 ▲4.46
Add New Post /wp-admin/post-new.php1,526 ▼017.41 ▼0.29627.97 ▼79.3056.09 ▼12.83
Media Library /wp-admin/upload.php1,403 ▲34.36 ▼0.0099.08 ▼17.4144.00 ▼4.32

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/cudazi-scroll-to-top/plugin.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example usage on light background), #2 (Example usage on dark background)
The official readme.txt is a good inspiration

cudazi-scroll-to-top/plugin.php 92% from 13 tests

The principal PHP file in "Cudazi Scroll to Top" v. 0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cudazi-scroll-to-top.php" instead of "plugin.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
Everything looks great! No dangerous files found in this plugin96 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1323845
PO File13221
JavaScript16618
CSS16512

PHP code Passed 2 tests

An short overview of 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.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods240.00%
▷ Protected methods00.00%
▷ Private methods360.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow.png1.15KB0.37KB▼ 67.97%
screenshot-1.png22.84KB10.88KB▼ 52.35%
screenshot-2.png20.40KB10.11KB▼ 50.45%