83% simple-donation-for-woo-lite

Code Review | Simple Donation For Woo Lite

WordPress plugin Simple Donation For Woo Lite scored83%from 54 tests.

About plugin

  • Plugin page: simple-donation-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2022
  • Latest release: Dec 8, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: nik00726 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /145 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.21MB] [CPU: ▼4.99ms] Passed 4 tests

This is a short check of server-side resources used by Simple Donation For Woo Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2237.04 ▼2.81
Dashboard /wp-admin3.52 ▲0.1847.80 ▼21.18
Posts /wp-admin/edit.php3.63 ▲0.2849.42 ▼1.29
Add New Post /wp-admin/post-new.php6.12 ▲0.23108.03 ▲7.59
Media Library /wp-admin/upload.php3.44 ▲0.2239.08 ▲5.33

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Donation For Woo Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.30 ▼1.101.98 ▲0.1340.98 ▼2.64
Dashboard /wp-admin2,206 ▲215.91 ▲0.05104.43 ▼16.6639.75 ▼6.49
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0339.16 ▼7.7835.36 ▼2.65
Add New Post /wp-admin/post-new.php1,533 ▼023.10 ▼0.32662.99 ▼2.3458.81 ▲9.02
Media Library /wp-admin/upload.php1,385 ▼34.16 ▼0.0398.95 ▼2.6940.75 ▼1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-donation-for-woo-lite/inc/donation_values_list.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/simple-donation-for-woo-lite/inc/donation_values_list.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-donation-for-woo-lite/inc/donation_values_list.php on line 3

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: donation, woocommerce donation, tips

simple-donation-for-woo-lite/simple-donation-for-woo.php 62% from 13 tests

Analyzing the main PHP file in "Simple Donation For Woo Lite" version 1.0
The following require your attention:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages/")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0" instead of "3.2")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-donation-for-woo-lite.php" instead of "simple-donation-for-woo.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
Everything looks great! No dangerous files found in this plugin3,845 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP2730341,474
CSS5105211,198
JavaScript42941191,173

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity95.50
▷ Minimum class complexity13.00
▷ Maximum class complexity178.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/chosen-sprite.png0.53KB0.88KB0.00%
admin/images/i13_donation.png23.04KB4.92KB▼ 78.65%