84% wcone

Code Review | wcOne - Ultimate Addons For WooCommerce

WordPress plugin wcOne - Ultimate Addons For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wcone
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 24, 2022
  • Latest release: Oct 2, 2022
  • Number of updates: 4
  • Update frequency: every 23.5 days
  • Top authors: themelooks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by wcOne - Ultimate Addons For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.06 ▲0.34
Dashboard /wp-admin3.31 ▼0.0350.05 ▼8.45
Posts /wp-admin/edit.php3.36 ▲0.0151.11 ▲1.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.37 ▼19.44
Media Library /wp-admin/upload.php3.24 ▲0.0135.08 ▼9.26

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 174 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
wcone_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for wcOne - Ultimate Addons For WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7113.32 ▼0.982.01 ▲0.0144.48 ▲0.76
Dashboard /wp-admin2,238 ▲324.88 ▼0.92104.99 ▲2.0641.93 ▼7.24
Posts /wp-admin/edit.php2,118 ▲182.04 ▲0.0137.34 ▼0.7534.94 ▼1.50
Add New Post /wp-admin/post-new.php1,538 ▲1217.48 ▼0.02666.75 ▲8.2264.53 ▲11.92
Media Library /wp-admin/upload.php1,411 ▲114.22 ▼0.06101.47 ▼2.6743.07 ▼5.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 36× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WCONE_DIR_ADMIN - assumed 'WCONE_DIR_ADMIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/wcone/admin/inc/settings-fields/class-settings-fields.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wcone\\add_action() in wp-content/plugins/wcone/inc/custom-hooks.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Wcone\\Admin\\Settings_Fields_Base' not found in wp-content/plugins/wcone/admin/inc/tabs-content/color-settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wcone\\add_action() in wp-content/plugins/wcone/inc/class-hooks.php:18
    • > PHP Fatal error
      require_once(): Failed opening required 'WCONE_DIR_ADMINinc/settings-fields/checkbox.php' (include_path='.:/usr/share/php') in wp-content/plugins/wcone/admin/inc/settings-fields/class-settings-fields.php on line 17
    • > PHP Warning
      Use of undefined constant WCONE_DIR_INC - assumed 'WCONE_DIR_INC' (this will throw an Error in a future version of PHP) in wp-content/plugins/wcone/wcone-init.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Wcone\\Admin\\Settings_Fields_Base' not found in wp-content/plugins/wcone/admin/inc/tabs-content/delivertimebranch.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/wcone/wcone.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Wcone\\Admin\\Settings_Fields_Base' not found in wp-content/plugins/wcone/admin/inc/tabs-content/location.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Wcone\\add_action() in wp-content/plugins/wcone/admin/admin.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
  • Requires at least: Version not formatted correctly
The official readme.txt is a good inspiration

wcone/wcone.php Passed 13 tests

The main PHP script in "wcOne - Ultimate Addons For WooCommerce" version 1.0.1 is automatically included on every request by WordPress
31 characters long description:
Ultimate Addons For WooCommerce

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
Success! There were no dangerous files found in this plugin32,551 lines of code in 104 files:
LanguageFilesBlank linesComment linesLines of code
SVG2701212,101
JavaScript82,5487,2537,988
CSS107882227,883
PHP591,1761,2254,579

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.66
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces5
Interfaces0
Traits17
Classes30
▷ Abstract classes26.67%
▷ Concrete classes2893.33%
▷ Final classes27.14%
Methods190
▷ Static methods10454.74%
▷ Public methods15380.53%
▷ Protected methods189.47%
▷ Private methods1910.00%
Functions43
▷ Named functions4093.02%
▷ Anonymous functions36.98%
Constants8
▷ Global constants8100.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
24 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon/odi.png3.72KB2.04KB▼ 45.04%
assets/img/icon/title_icon.png0.94KB0.46KB▼ 50.73%
admin/assets/wcone-logo.png6.44KB3.33KB▼ 48.27%
assets/img/cross.png0.25KB0.18KB▼ 27.63%
assets/img/icon/item1.png18.09KB5.94KB▼ 67.19%