90% simpact-for-woocommerce

Code Review | Simpact for Woocommerce

WordPress plugin Simpact for Woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: simpact-for-wooco...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 16, 2018
  • Latest release: Feb 20, 2019
  • Number of updates: 24
  • Update frequency: every 14.3 days
  • Top authors: mavantwout (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /754 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.07MB] [CPU: ▼3.08ms] Passed 4 tests

Analyzing server-side resources used by Simpact for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0845.13 ▲0.49
Dashboard /wp-admin3.38 ▲0.0846.86 ▼1.97
Posts /wp-admin/edit.php3.43 ▲0.0745.23 ▼2.78
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.73 ▼7.98
Media Library /wp-admin/upload.php3.30 ▲0.0736.39 ▲0.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simpact for Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5713.55 ▼0.701.49 ▼0.7338.99 ▼9.08
Dashboard /wp-admin2,218 ▲305.80 ▼0.0596.17 ▼24.5440.02 ▼8.16
Posts /wp-admin/edit.php2,104 ▲152.01 ▲0.0035.66 ▲1.2332.39 ▼5.54
Add New Post /wp-admin/post-new.php1,552 ▲14118.42 ▲0.45664.83 ▲53.6251.31 ▼9.51
Media Library /wp-admin/upload.php1,394 ▲34.16 ▼0.07102.93 ▲4.8841.86 ▼1.99

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: plastic, charity, trees, donate, fundraising...

simpact-for-woocommerce/simpact-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Simpact for Woocommerce" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
A free way to make your webshop support charities with Simpact (https://Simpact.co/).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin546 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25937382
CSS1110122
Markdown122042

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.35MB with 0.24MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/my-logo.png357.61KB115.21KB▼ 67.78%