84% awcode-toolkit

Code Review | AWcode Toolkit

WordPress plugin AWcode Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: awcode-toolkit
  • Plugin version: 1.0.14
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: Sep 25, 2023
  • Number of updates: 43
  • Update frequency: every 30.9 days
  • Top authors: awcode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by AWcode Toolkit
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0048.50 ▲7.77
Dashboard /wp-admin3.31 ▲0.0150.92 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0146.38 ▼11.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.08 ▼9.92
Media Library /wp-admin/upload.php3.23 ▲0.0137.58 ▼0.51
AW Toolbox /wp-admin/options-general.php?page=awtoolbox3.2635.96

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

AWcode Toolkit: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.15 ▼0.211.78 ▼0.1047.58 ▲4.20
Dashboard /wp-admin2,202 ▲325.62 ▲0.0186.59 ▼14.6736.45 ▼13.95
Posts /wp-admin/edit.php2,104 ▲11.96 ▲0.0135.43 ▼2.3533.82 ▼3.95
Add New Post /wp-admin/post-new.php1,529 ▲323.00 ▼0.05670.69 ▼44.7049.81 ▼11.21
Media Library /wp-admin/upload.php1,407 ▲74.14 ▼0.0098.27 ▼12.3342.39 ▼5.76
AW Toolbox /wp-admin/options-general.php?page=awtoolbox1,0392.0023.7427.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/awcode-toolkit/includes/settings-template.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/awcode-toolkit/templete/supplier_add.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awcode-toolkit/includes/class.awtoolkit-woocommerce.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/awcode-toolkit/templete/supplier_list.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/awcode-toolkit/includes/class.awtoolkit-setting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/awcode-toolkit/includes/class.awtoolkit-woo-product-suppliers.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Tested up to: Invalid version format
The official readme.txt is a good inspiration

awcode-toolkit/aw-toolkit.php 92% from 13 tests

The entry point to "AWcode Toolkit" version 1.0.14 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("awcode-toolkit.php" instead of "aw-toolkit.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,254 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP81961141,254

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions43
▷ Named functions4093.02%
▷ Anonymous functions36.98%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin