83% serverclub-digital-sms-for-woocommerce

Code Review | Serverclub.Digital SMS for WooCommerce

WordPress plugin Serverclub.Digital SMS for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: serverclub-digita...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 19, 2021
  • Latest release: Jun 19, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: serverclub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 326 total downloads

Benchmarks

Plugin footprint 83% 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.12MB] [CPU: ▼0.70ms] Passed 4 tests

Analyzing server-side resources used by Serverclub.Digital SMS for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1437.52 ▼8.17
Dashboard /wp-admin3.42 ▲0.1248.83 ▲1.23
Posts /wp-admin/edit.php3.53 ▲0.1851.56 ▲3.25
Add New Post /wp-admin/post-new.php6.00 ▲0.11100.22 ▲6.26
Media Library /wp-admin/upload.php3.34 ▲0.1135.80 ▲0.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Serverclub.Digital SMS for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.251.61 ▼0.3540.86 ▼5.04
Dashboard /wp-admin2,206 ▲185.88 ▲0.99103.35 ▼1.3340.15 ▼5.09
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0439.61 ▼0.7636.84 ▲1.51
Add New Post /wp-admin/post-new.php1,542 ▼018.50 ▲0.34636.44 ▲36.4653.23 ▲0.77
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.0097.35 ▼2.6841.10 ▼5.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/serverclub-digital-sms-for-woocommerce/includes/ServerClubDigitalTrigger.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Admin settings page), #2 (Admin settings page)
You can look at the official readme.txt

serverclub-digital-sms-for-woocommerce/serverclubsms-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Serverclub.Digital SMS for WooCommerce" version 1.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("serverclub-digital-sms-for-woocommerce.php" instead of "serverclubsms-woocommerce.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected880 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP16325276875
JSON1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods56
▷ Static methods1832.14%
▷ Public methods4987.50%
▷ Protected methods00.00%
▷ Private methods712.50%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
6 PNG files occupy 0.46MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-1544x500.png145.20KB57.18KB▼ 60.62%
banner-772x250.png66.19KB23.92KB▼ 63.86%
icon-128x128.png10.04KB3.44KB▼ 65.76%
screenshot-1.png116.62KB46.16KB▼ 60.42%
screenshot-2.png113.12KB42.55KB▼ 62.39%