90% wp-awesome-back-to-top

Code Review | WP Awesome back to top

WordPress plugin WP Awesome back to top scored90%from 54 tests.

About plugin

  • Plugin page: wp-awesome-back-t...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.2
  • WordPress version: 6.3.1
  • First release: Aug 1, 2014
  • Latest release: Oct 13, 2017
  • Number of updates: 21
  • Update frequency: every 55.7 days
  • Top authors: suifengtec (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,991 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by WP Awesome back to top
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0246.92 ▲7.88
Dashboard /wp-admin3.38 ▲0.0744.59 ▼1.31
Posts /wp-admin/edit.php3.49 ▲0.1345.92 ▼0.78
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.03 ▼9.52
Media Library /wp-admin/upload.php3.30 ▲0.0734.02 ▲1.19
AB2TOP Settings /wp-admin/options-general.php?page=ab2t-settings3.2730.63

Server storage [IO: ▲0.18MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Awesome back to top
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.26 ▼0.091.73 ▲0.0847.34 ▲11.44
Dashboard /wp-admin2,199 ▲225.62 ▼0.1492.03 ▼0.5538.12 ▼3.57
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0139.25 ▲3.9435.10 ▼1.28
Add New Post /wp-admin/post-new.php1,529 ▼023.15 ▲0.11646.00 ▲40.7263.21 ▲14.98
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.0095.86 ▲0.5541.75 ▼2.87
AB2TOP Settings /wp-admin/options-general.php?page=ab2t-settings8472.0221.3725.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • ab2t_basics
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: ab2t, top, back to top

wp-awesome-back-to-top/wp-awesome-back-to-top.php Passed 13 tests

The main PHP script in "WP Awesome back to top" version 1.2 is automatically included on every request by WordPress
44 characters long description:
An awesome back to top plugin for wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,131 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45741951,537
PHP39735309
PO File37191,603147
CSS1610138

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.33
▷ Minimum class complexity3.00
▷ Maximum class complexity28.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods32
▷ Static methods13.12%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin