88% sfx-woo-donate

Code Review | Sfx product donate

WordPress plugin Sfx product donate scored 88% from 54 tests.

About plugin

  • Plugin page: sfx-woo-donate
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.3
  • WordPress version: 5.8.1
  • First release: Nov 24, 2020
  • Latest release: Nov 24, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: safaksaracoglu2012 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 110 total downloads

Benchmarks

Plugin footprint Passed 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.11MB] [CPU: ▼137.84ms] Passed 4 tests

A check of server-side resources used by Sfx product donate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1833.90 ▲14.32
Dashboard /wp-admin3.22 ▲0.1661.10 ▲16.41
Posts /wp-admin/edit.php3.27 ▲0.1651.82 ▲6.37
Add New Post /wp-admin/post-new.php5.49 ▲0.0690.32 ▼577.71
Media Library /wp-admin/upload.php3.08 ▲0.0735.52 ▲5.65
Settings /wp-admin/admin.php?page=sfx-woo-donate/views/admin/settings.php3.0836.54
/wp-admin/admin.php?page=process_admin2.9826.96
Woo Donate /wp-admin/admin.php?page=sfx-woo-donate/views/admin/index.php3.0833.88

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 54 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Sfx product donate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,048 ▲45218.30 ▲2.6518.07 ▲8.7849.81 ▼1.72
Dashboard /wp-admin3,203 ▲2728.14 ▲2.13168.58 ▲14.38121.02 ▲11.62
Posts /wp-admin/edit.php3,038 ▲2994.44 ▲1.7292.71 ▲26.8295.70 ▲7.36
Add New Post /wp-admin/post-new.php1,653 ▼1,89221.89 ▲0.61276.92 ▼225.36111.24 ▼2.41
Media Library /wp-admin/upload.php1,804 ▼35.06 ▲0.05118.95 ▼42.94137.72 ▲8.54
Settings /wp-admin/admin.php?page=sfx-woo-donate/views/admin/settings.php1,4543.8679.1691.74
/wp-admin/admin.php?page=process_admin80.900.060.15
Woo Donate /wp-admin/admin.php?page=sfx-woo-donate/views/admin/index.php1,4024.5188.2286.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sfx-woo-donate/functions/front_generate.php
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sfx-woo-donate/core/__xt__/_menu_items.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-woo-donate/controller/front.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-woo-donate/widgets/sfxplugin.php:3
    • > PHP Warning
      Use of undefined constant sfxdonate_images_url - assumed 'sfxdonate_images_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/sfx-woo-donate/core/configs.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-woo-donate/controller/woo.php:5
    • > PHP Warning
      Use of undefined constant sfxdonate_is_pro - assumed 'sfxdonate_is_pro' (this will throw an Error in a future version of PHP) in wp-content/plugins/sfx-woo-donate/core/configs.php on line 41
    • > PHP Warning
      Use of undefined constant sfxdonate_plugin_id - assumed 'sfxdonate_plugin_id' (this will throw an Error in a future version of PHP) in wp-content/plugins/sfx-woo-donate/core/configs.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-woo-donate/controller/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sfx-woo-donate/views/__xt__/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-woo-donate/core/menus.php:3

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: woo product donate, woo, woo donate, donate

sfx-woo-donate/sfx-product-donate.php 85% from 13 tests

This is the main PHP file of "Sfx product donate" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sfx-woo-donate.php" instead of "sfx-product-donate.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin12,377 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,3901,5989,497
PHP247504832,514
CSS26113187
PO File17784179

PHP code Passed 2 tests

An short overview of 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.50
Average class complexity80.20
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods99
▷ Static methods11.01%
▷ Public methods8484.85%
▷ Protected methods1515.15%
▷ Private methods00.00%
Functions38
▷ Named functions1539.47%
▷ Anonymous functions2360.53%
Constants44
▷ Global constants44100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/images/icon-black.png0.29KB0.27KB▼ 9.60%
common/images/icon.png0.32KB0.27KB▼ 15.74%
common/images/setting.png0.51KB0.43KB▼ 14.94%