90% woo-earn-sharing

Code Review | Woo Earn Share

WordPress plugin Woo Earn Share scored90%from 54 tests.

About plugin

  • Plugin page: woo-earn-sharing
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2018
  • Latest release: Oct 3, 2022
  • Number of updates: 9
  • Update frequency: every 158.0 days
  • Top authors: lucius0101 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.58ms] Passed 4 tests

A check of server-side resources used by Woo Earn Share
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.34 ▼6.82
Dashboard /wp-admin3.31 ▼0.0447.05 ▼15.83
Posts /wp-admin/edit.php3.36 ▲0.0047.36 ▼0.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.53 ▼13.50
Media Library /wp-admin/upload.php3.23 ▲0.0035.93 ▼6.17

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
woo_earn_sharing_options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Woo Earn Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.72 ▲0.361.94 ▲0.2345.02 ▲6.07
Dashboard /wp-admin2,195 ▲155.65 ▲0.0783.58 ▼3.6545.05 ▲4.33
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0336.55 ▲0.3032.39 ▼1.51
Add New Post /wp-admin/post-new.php1,526 ▼223.05 ▼0.00656.31 ▼21.4250.04 ▼14.94
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.01113.25 ▼3.9846.24 ▼11.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

woo-earn-sharing/woo-earn-sharing.php Passed 13 tests

This is the main PHP file of "Woo Earn Share" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
56 characters long description:
Let your users share their own codes and earn discounts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected724 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP11149444667
PO File1202357

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1328.89%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin