83% attach-excel-invoice-wooc-wpshare247

Code Review | Attach Excel Invoice WOOC - WPSHARE247

WordPress plugin Attach Excel Invoice WOOC - WPSHARE247 scored83%from 54 tests.

About plugin

  • Plugin page: attach-excel-invo...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2020
  • Latest release: Jan 6, 2021
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: website366 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /665 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.05ms] Passed 4 tests

Analyzing server-side resources used by Attach Excel Invoice WOOC - WPSHARE247
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.27 ▲2.62
Dashboard /wp-admin3.40 ▲0.1047.83 ▼1.64
Posts /wp-admin/edit.php3.51 ▲0.1648.82 ▼4.01
Add New Post /wp-admin/post-new.php6.00 ▲0.1187.03 ▼17.16
Media Library /wp-admin/upload.php3.32 ▲0.0938.12 ▲3.65
Configure AEIWOOC /wp-admin/admin.php?page=Aeiwooc-options3.2935.42

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Attach Excel Invoice WOOC - WPSHARE247
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.45 ▲0.081.72 ▼0.0741.07 ▼1.81
Dashboard /wp-admin2,218 ▲415.88 ▲0.1597.01 ▲3.7041.00 ▼3.21
Posts /wp-admin/edit.php2,126 ▲262.32 ▲0.3142.16 ▲4.9634.74 ▼3.27
Add New Post /wp-admin/post-new.php1,544 ▼323.36 ▲0.80633.40 ▼14.8134.07 ▼14.31
Media Library /wp-admin/upload.php1,424 ▲244.50 ▲0.23104.62 ▲5.2341.29 ▼4.87
Configure AEIWOOC /wp-admin/admin.php?page=Aeiwooc-options8402.1028.7723.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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPSHARE247_CLASS_Aeiwooc - assumed 'WPSHARE247_CLASS_Aeiwooc' (this will throw an Error in a future version of PHP) in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/option-form-template.php on line 2
    • > PHP Warning
      Use of undefined constant WPSHARE247_AEIWOOC_PLUGIN_INC_DIR - assumed 'WPSHARE247_AEIWOOC_PLUGIN_INC_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/define.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/tabs/tab_pro_general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/class.setting.page.php:13
    • > PHP Warning
      Use of undefined constant WPSHARE247_AEIWOOC_PLUGIN_INC_ASSETS_URL - assumed 'WPSHARE247_AEIWOOC_PLUGIN_INC_ASSETS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/assets/addmin_footer_js.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/class.helper.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/tabs/message.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/theme_functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/inc/tabs/tab_pro_setting.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/attach-excel-invoice-wooc-wpshare247/assets/addmin_footer_js.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === attach-excel-invoice-wooc-wpshare247 === )
The official readme.txt is a good inspiration

attach-excel-invoice-wooc-wpshare247/wpshare247-attach-excel-invoice-wooc.php 85% from 13 tests

Analyzing the main PHP file in "Attach Excel Invoice WOOC - WPSHARE247" version 1.1
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("attach-excel-invoice-wooc-wpshare247.php" instead of "wpshare247-attach-excel-invoice-wooc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,267 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14270841,816
PO File1941203
JavaScript1308138
SVG10065
CSS12145

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity27.67
▷ Minimum class complexity10.00
▷ Maximum class complexity62.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods44
▷ Static methods1534.09%
▷ Public methods4193.18%
▷ Protected methods36.82%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants1688.89%
▷ Class constants211.11%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 0.47MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/border-style/medium.png0.26KB0.14KB▼ 44.74%
assets/screenshot-4.png43.39KB14.05KB▼ 67.61%
assets/excel_logo.png28.77KB4.11KB▼ 85.73%
assets/border-style/mediumDashed.png0.28KB0.14KB▼ 48.25%
inc/excel-lib/demo/template-3.xlsx.png24.57KB12.58KB▼ 48.79%