83% improved-save-button

Code Review | Improved Save Button

WordPress plugin Improved Save Button scored83%from 54 tests.

About plugin

  • Plugin page: improved-save-button
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: May 11, 2020
  • Number of updates: 20
  • Update frequency: every 95.4 days
  • Top authors: LabelBlanc (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

5,000+ active /16,850 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.24MB] [CPU: ▼6.15ms] Passed 4 tests

This is a short check of server-side resources used by Improved Save Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2739.28 ▼0.20
Dashboard /wp-admin3.58 ▲0.2443.86 ▼13.43
Posts /wp-admin/edit.php3.63 ▲0.2846.78 ▲1.30
Add New Post /wp-admin/post-new.php6.12 ▲0.2491.45 ▼12.26
Media Library /wp-admin/upload.php3.44 ▲0.2238.34 ▲6.72
Improved Save Button /wp-admin/options-general.php?page=save-and-then3.4132.68

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Improved Save Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.331.71 ▼0.6240.86 ▼1.60
Dashboard /wp-admin2,207 ▲194.84 ▼0.0798.90 ▼5.2341.60 ▼3.50
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0439.31 ▲1.3934.56 ▼3.45
Add New Post /wp-admin/post-new.php1,530 ▲223.31 ▲5.05617.51 ▲4.2765.31 ▼7.45
Media Library /wp-admin/upload.php1,392 ▲14.18 ▲0.0192.09 ▼25.4242.51 ▼11.74
Improved Save Button /wp-admin/options-general.php?page=save-and-then9662.3827.1541.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-previous.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/improved-save-button/improved-save-button.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-new.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-return.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-duplicate.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-view-popup.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-view.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-next.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'LB_Save_And_Then_Action' not found in wp-content/plugins/improved-save-button/actions/class-lb-save-and-then-action-list.php:28

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 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 27 tag instead of maximum 10
You can look at the official readme.txt

improved-save-button/improved-save-button.php 77% from 13 tests

This is the main PHP file of "Improved Save Button" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("/")
  • Description: Keep the plugin description shorter than 140 characters (currently 200 characters long)
  • Domain Path: Prefix the domain path with a forward slash character ("//")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,584 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP173531,2121,064
JavaScript6116373363
Sass1256155
CSS2022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods109
▷ Static methods4944.95%
▷ Public methods10596.33%
▷ Protected methods43.67%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.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