100% wc-granatum

Code Review | WooCommerce Granatum

WordPress plugin WooCommerce Granatum scored 100% from 54 tests.

About plugin

  • Plugin page: wc-granatum
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.1
  • WordPress version: 5.8.1
  • First release: Oct 10, 2015
  • Latest release: Jan 25, 2017
  • Number of updates: 30
  • Update frequency: every 15.8 days
  • Top authors: miguelmuller (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,008 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼139.28ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Granatum
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1241.30 ▲19.64
Dashboard /wp-admin3.06 ▲0.0146.64 ▲0.81
Posts /wp-admin/edit.php3.11 ▲0.0140.69 ▲1.27
Add New Post /wp-admin/post-new.php5.42 ▼0.0188.42 ▼558.05
Media Library /wp-admin/upload.php3.01 ▲0.0029.31 ▼1.13

Server storage [IO: ▲0.04MB] [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: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Granatum
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11615.84 ▲0.2710.60 ▲1.4950.99 ▲1.04
Dashboard /wp-admin2,976 ▲425.89 ▼0.04132.07 ▼10.67110.32 ▼1.99
Posts /wp-admin/edit.php2,748 ▲92.71 ▼0.0168.63 ▲5.9799.90 ▲9.83
Add New Post /wp-admin/post-new.php1,678 ▲18018.81 ▼0.17382.43 ▲5.56105.40 ▼3.80
Media Library /wp-admin/upload.php1,816 ▲95.03 ▼0.01149.34 ▲0.99116.97 ▲0.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
You can take inspiration from this readme.txt

wc-granatum/wc-granatum.php Passed 13 tests

The main PHP file in "WooCommerce Granatum" ver. 0.1.5 adds more information about the plugin and also serves as the entry point for this plugin
40 characters long description:
Add integration with Granatum Financeiro

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin600 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10135234525
PO File1273475

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods2993.55%
▷ Protected methods00.00%
▷ Private methods26.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected