84% lightbulb-save-and-close

Code Review | Save and Close

WordPress plugin Save and Close scored84%from 54 tests.

About plugin

  • Plugin page: lightbulb-save-an...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2013
  • Latest release: Apr 18, 2013
  • Number of updates: 13
  • Update frequency: every 2.2 days
  • Top authors: lightbulbdigital (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

700+ active /4,652 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.85ms] Passed 4 tests

Server-side resources used by Save and Close
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.27 ▼7.51
Dashboard /wp-admin3.32 ▲0.0244.84 ▼4.08
Posts /wp-admin/edit.php3.37 ▲0.0247.89 ▼2.24
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.83 ▼1.57
Media Library /wp-admin/upload.php3.24 ▲0.0235.27 ▲0.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Save and Close
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.514.40 ▲2.6341.95 ▼0.56
Dashboard /wp-admin2,209 ▲245.86 ▼0.0496.71 ▼4.6440.00 ▼3.28
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0639.22 ▼2.5135.54 ▼0.73
Add New Post /wp-admin/post-new.php1,514 ▼3017.34 ▼0.94662.87 ▲26.8156.80 ▲4.99
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.1197.82 ▲1.3341.25 ▼2.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lightbulb-save-and-close/lightbulb-save-and-close.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

lightbulb-save-and-close/lightbulb-save-and-close.php Passed 13 tests

The entry point to "Save and Close" version 1.2.1 is a PHP file that has certain tags in its header comment area
101 characters long description:
Adds a button to the Edit Post page which saves the post and redirects back to the post listing page.

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 plugin53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1163453

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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