84% scrubbill

Code Review | ScrubBill

WordPress plugin ScrubBill scored84%from 54 tests.

About plugin

  • Plugin page: scrubbill
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2021
  • Latest release: Aug 7, 2023
  • Number of updates: 14
  • Update frequency: every 60.3 days
  • Top authors: scrubbill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /4,221 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.23ms] Passed 4 tests

Server-side resources used by ScrubBill
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.70 ▲3.46
Dashboard /wp-admin3.40 ▲0.1049.11 ▼3.47
Posts /wp-admin/edit.php3.52 ▲0.1645.23 ▼0.30
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.08 ▼20.52
Media Library /wp-admin/upload.php3.33 ▲0.1037.68 ▲3.39

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

ScrubBill: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.251.77 ▲0.3043.41 ▲3.53
Dashboard /wp-admin2,189 ▲145.51 ▼0.1985.09 ▼16.7134.78 ▼6.63
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0436.39 ▲1.2736.02 ▲0.13
Add New Post /wp-admin/post-new.php1,535 ▼018.36 ▲0.10656.69 ▲58.5169.19 ▲6.30
Media Library /wp-admin/upload.php1,400 ▲64.26 ▲0.09101.06 ▲7.0343.30 ▼1.45

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Scrubbill\\Plugin\\Scrubbill\\trailingslashit() in wp-content/plugins/scrubbill/includes/config/config.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/scrubbill/includes/classes/class-scrubbill-shipping-method.php:21
    • > PHP Fatal error
      Trait 'Scrubbill\\Plugin\\Scrubbill\\Traits\\Singleton' not found in wp-content/plugins/scrubbill/includes/classes/class-bootstrap.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Scrubbill\\Plugin\\Scrubbill\\trailingslashit() in wp-content/plugins/scrubbill/includes/config/config.php:12

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: woocommerce, shipping

scrubbill/scrubbill.php 92% from 13 tests

The principal PHP file in "ScrubBill" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
There were no executable files found in this plugin489 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP13135502489

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.89
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods2480.00%
▷ Protected methods620.00%
▷ Private methods00.00%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants13
▷ Global constants215.38%
▷ Class constants1184.62%
▷ Public constants11100.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
There are no PNG files in this plugin