10% disable-back-button

Code Review | Disable Back Button

WordPress plugin Disable Back Button scored10%from 54 tests.

About plugin

  • Plugin page: disable-back-button
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.1
  • WordPress version: 6.3.1
  • First release: Jan 1, 2018
  • Latest release: Jan 1, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: MManifesto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,083 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/disable-back-button/admin/redux-framework/inc/class.redux_filesystem.php+29
    Creating default object from empty value

Server metrics [RAM: ▼0.36MB] [CPU: ▼43.08ms] Passed 4 tests

Server-side resources used by Disable Back Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1615.78 ▼25.25
Dashboard /wp-admin3.64 ▲0.3416.70 ▼32.72
Posts /wp-admin/edit.php3.64 ▲0.2916.02 ▼37.50
Add New Post /wp-admin/post-new.php3.64 ▼2.2420.23 ▼76.84
Media Library /wp-admin/upload.php3.64 ▲0.4218.43 ▼16.63
DBB Options /wp-admin/options-general.php?page=dbb_options3.6516.86
Install Plugins /wp-admin/plugins.php?page=install-required-plugins3.7516.56
Redux Framework /wp-admin/tools.php?page=redux-about3.6514.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 510 new files
Database: no new tables, 8 new options
New WordPress options
dbb-transients
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
redux_version_upgraded_from
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Disable Back Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.59 ▼1.022.41 ▲0.4543.59 ▼3.52
Dashboard /wp-admin2,321 ▲1184.89 ▼0.19101.62 ▼12.3945.72 ▲3.68
Posts /wp-admin/edit.php2,147 ▲442.06 ▲0.0639.81 ▼6.2841.78 ▲8.01
Add New Post /wp-admin/post-new.php1,558 ▲417.52 ▼0.55618.58 ▼16.8568.96 ▲14.35
Media Library /wp-admin/upload.php1,443 ▲404.19 ▲0.0196.36 ▼5.0248.11 ▼1.22
DBB Options /wp-admin/options-general.php?page=dbb_options1,1702.6159.2448.47
Install Plugins /wp-admin/plugins.php?page=install-required-plugins9822.0827.0833.34
Redux Framework /wp-admin/tools.php?page=redux-about1,1083.6575.6076.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/disable-back-button/admin/redux-framework/inc/class.redux_filesystem.php+29
    Creating default object from empty value
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • redux_version_upgraded_from
    • dbb-transients
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=redux-about
    • > Warning in wp-content/plugins/disable-back-button/admin/redux-framework/inc/class.redux_filesystem.php+29
    Creating default object from empty value

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
Please fix the following
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/disable-back-button/admin/tgm/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/disable-back-button/admin/redux-framework/inc/welcome/views/support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-back-button/admin/redux-framework/inc/class.p.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/disable-back-button/admin/redux-framework/inc/welcome/views/credits.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/disable-back-button/admin/redux-framework/templates/panel/header.tpl.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Section' not found in wp-content/plugins/disable-back-button/admin/redux-framework/inc/extensions/customizer/inc/customizer_devs.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/disable-back-button/admin/redux-framework/inc/welcome/views/extensions.php:64
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/disable-back-button/admin/redux-framework/templates/panel/content.tpl.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-back-button/admin/redux-framework/inc/fields/select/elusive-icons.php:312
    • > PHP Fatal error
      Uncaught Error: Class 'Redux_Customizer_Control' not found in wp-content/plugins/disable-back-button/admin/redux-framework/inc/extensions/customizer/inc/customizer_fields.php:3

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: funnel, conversion

disable-back-button/disable-back-button.php Passed 13 tests

The principal PHP file in "Disable Back Button" v. 1.0.1 is loaded by WordPress automatically on each request
63 characters long description:
Allows you to disable the back button on your WordPress website

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected43,301 lines of code in 389 files:
LanguageFilesBlank linesComment linesLines of code
PHP1114,1957,01617,401
JavaScript1683,2622,57015,382
Sass541,181607,568
JSON21840945
SVG100934
CSS4814654832
Markdown2480103
LESS22081
Bourne Shell124055

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity32.54
▷ Minimum class complexity1.00
▷ Maximum class complexity880.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes112
▷ Abstract classes00.00%
▷ Concrete classes112100.00%
▷ Final classes00.00%
Methods689
▷ Static methods10715.53%
▷ Public methods52576.20%
▷ Protected methods11416.55%
▷ Private methods507.26%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants64
▷ Global constants46.25%
▷ Class constants6093.75%
▷ Public constants60100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
32 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/redux-framework/assets/img/2cl.png2.91KB0.24KB▼ 91.79%
admin/redux-framework/assets/img/4-col-portfolio.png1.01KB0.17KB▼ 83.45%
admin/redux-framework/assets/css/vendor/jquery-ui-bootstrap/images/ui-icons_f6cf3b_256x240.png8.68KB4.11KB▼ 52.68%
admin/redux-framework/assets/css/vendor/jquery-ui-bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
admin/redux-framework/assets/img/1c.png0.13KB0.13KB▼ 0.72%