74% bash-it-out

Code Review | Bash It Out

WordPress plugin Bash It Out scored74%from 54 tests.

About plugin

  • Plugin page: bash-it-out
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Jul 28, 2018
  • Latest release: Sep 3, 2022
  • Number of updates: 10
  • Update frequency: every 149.9 days
  • Top authors: ramonopoly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /868 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.61MB] [CPU: ▼20.02ms] Passed 4 tests

Analyzing server-side resources used by Bash It Out
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.41 ▼6.06
Dashboard /wp-admin3.37 ▲0.0648.26 ▼1.74
Posts /wp-admin/edit.php3.48 ▲0.1248.18 ▼6.22
Add New Post /wp-admin/post-new.php3.25 ▼2.6437.50 ▼65.94
Media Library /wp-admin/upload.php3.29 ▲0.0637.67 ▼1.86

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Bash It Out
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.26 ▼0.281.79 ▲0.1042.90 ▼0.41
Dashboard /wp-admin2,207 ▲305.61 ▼0.0587.58 ▼5.6638.27 ▼0.47
Posts /wp-admin/edit.php2,112 ▲91.99 ▼0.0133.83 ▼8.9337.32 ▼1.16
Add New Post /wp-admin/post-new.php1,538 ▲1223.00 ▼0.08648.90 ▼27.3555.84 ▲0.37
Media Library /wp-admin/upload.php1,412 ▲124.19 ▼0.0997.36 ▼16.7144.78 ▼2.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Bash_It_Out\Plugin::uninstall_plugin() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/bash-it-out/admin/templates/admin-page.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: writing timer, writing, editor

bash-it-out/bash-it-out.php Passed 13 tests

The main PHP file in "Bash It Out" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
92 characters long description:
Forget about quality, form or style. Achieve your word count goals with this pressure timer.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,267 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript283256524
PHP553165391
CSS16531352

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.00
▷ Minimum class complexity6.00
▷ Maximum class complexity16.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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
3 compressed PNG files occupy 0.08MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/editor.png21.73KB19.91KB▼ 8.38%
assets/images/bash-it-out.png30.67KB28.98KB▼ 5.50%
assets/images/editor-complete.png25.03KB23.63KB▼ 5.61%