72% wp-back-button

Code Review | WP Back Button

WordPress plugin WP Back Button scored72%from 54 tests.

About plugin

  • Plugin page: wp-back-button
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Mar 23, 2016
  • Latest release: Dec 30, 2016
  • Number of updates: 39
  • Update frequency: every 7.2 days
  • Top authors: pwron (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /16,540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by WP Back Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0746.91 ▲2.95
Dashboard /wp-admin3.38 ▲0.0849.47 ▼6.08
Posts /wp-admin/edit.php3.49 ▲0.1448.05 ▼6.61
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.17 ▼11.83
Media Library /wp-admin/upload.php3.30 ▲0.0740.97 ▲3.55
WP Back Button /wp-admin/options-general.php?page=wp_back_button3.2533.83

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Back Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.54 ▼0.819.66 ▲7.3840.54 ▼12.00
Dashboard /wp-admin2,218 ▲505.84 ▲0.1992.09 ▼0.2640.76 ▼3.13
Posts /wp-admin/edit.php2,128 ▲282.29 ▲0.3542.23 ▲0.8735.00 ▼4.27
Add New Post /wp-admin/post-new.php1,557 ▲2923.29 ▲0.24620.83 ▼66.8034.51 ▼20.72
Media Library /wp-admin/upload.php1,423 ▲234.38 ▲0.23102.25 ▼16.4043.46 ▼2.21
WP Back Button /wp-admin/options-general.php?page=wp_back_button1,2552.3654.0325.08

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_xm_wpbb_w
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_back_button
    • > Notice in wp-content/plugins/wp-back-button/options-page.php+208
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-back-button/wp-back-button-widget.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-back-button/wp-back-button.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-back-button/options-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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 your attention:
  • Screenshots: Please add an image for screenshot #4 (screenshot-4.png)
You can look at the official readme.txt

wp-back-button/wp-back-button.php 92% from 13 tests

Analyzing the main PHP file in "WP Back Button" version 1.1.3
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin448 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310919337
CSS113871
JavaScript26140

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity7.00
▷ Maximum class complexity23.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants2
▷ Global constants2100.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
No PNG files were detected