74% sarbacane-desktop

Code Review | Sarbacane

WordPress plugin Sarbacane scored74%from 54 tests.

About plugin

  • Plugin page: sarbacane-desktop
  • Plugin version: 1.4.15
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: Nov 8, 2022
  • Number of updates: 39
  • Update frequency: every 66.3 days
  • Top authors: sarbacanesoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /10,273 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.17ms] Passed 4 tests

Server-side resources used by Sarbacane
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2139.36 ▼5.50
Dashboard /wp-admin3.52 ▲0.2147.22 ▼3.04
Posts /wp-admin/edit.php3.63 ▲0.2750.52 ▲2.69
Add New Post /wp-admin/post-new.php6.10 ▲0.2192.85 ▲5.12
Media Library /wp-admin/upload.php3.44 ▲0.2134.63 ▼2.82
Connection /wp-admin/admin.php?page=wp_interconnection3.4232.83
Sarbacane /wp-admin/admin.php?page=sarbacane3.4232.48
Configuration /wp-admin/admin.php?page=wp_lists_sync3.4233.20

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 40 new files
Database: 2 new tables, 7 new options
New tables
wp_sd_updates
wp_sd_subscribers
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
sarbacane_news_registration_button

Browser metrics Passed 4 tests

A check of browser resources used by Sarbacane
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.65 ▼0.701.59 ▼0.9438.69 ▼7.02
Dashboard /wp-admin2,236 ▲485.84 ▲0.9795.27 ▼16.9574.18 ▲30.93
Posts /wp-admin/edit.php2,122 ▲332.04 ▲0.0439.43 ▲4.4834.52 ▲0.03
Add New Post /wp-admin/post-new.php1,548 ▲1522.98 ▼0.03658.63 ▼1.9854.97 ▼2.11
Media Library /wp-admin/upload.php1,418 ▲304.21 ▼0.0098.52 ▼9.9175.76 ▲29.17
Connection /wp-admin/admin.php?page=wp_interconnection8892.0822.8032.18
Sarbacane /wp-admin/admin.php?page=sarbacane9532.1924.6936.38
Configuration /wp-admin/admin.php?page=wp_lists_sync9472.2024.0832.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_sd_subscribers
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/sarbacane-desktop/class.sarbacane-newsletterwidget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can look at the official readme.txt

sarbacane-desktop/sarbacane.php 92% from 13 tests

The primary PHP file in "Sarbacane" version 1.4.15 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sarbacane-desktop.php" instead of "sarbacane.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,994 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14103321,927
CSS6923546
PO File194117273
JavaScript3378248

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.00
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity4.87
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods24.26%
▷ Public methods2859.57%
▷ Protected methods00.00%
▷ Private methods1940.43%
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

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow-down.png1.07KB0.25KB▼ 76.23%
images/preview.png75.87KB30.11KB▼ 60.31%
images/document-list.png0.35KB0.27KB▼ 24.23%
images/sd.png50.48KB11.58KB▼ 77.07%
images/cross.png1.02KB0.64KB▼ 37.27%