83% cost-calculator-by-azexo

Code Review | Cost Calculator by AZEXO

WordPress plugin Cost Calculator by AZEXO scored83%from 54 tests.

About plugin

  • Plugin page: cost-calculator-b...
  • Plugin version: 1.27.20
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Jan 12, 2018
  • Latest release: May 20, 2019
  • Number of updates: 39
  • Update frequency: every 12.7 days
  • Top authors: azexo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.35ms] Passed 4 tests

A check of server-side resources used by Cost Calculator by AZEXO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1638.24 ▲1.59
Dashboard /wp-admin3.46 ▲0.1644.66 ▲1.85
Posts /wp-admin/edit.php3.52 ▲0.1647.99 ▲5.44
Add New Post /wp-admin/post-new.php6.05 ▲0.1683.24 ▼16.66
Media Library /wp-admin/upload.php3.39 ▲0.1635.73 ▲3.84
Forms Submissions /wp-admin/edit.php?post_type=azf_submission3.4334.90
Add Submission /wp-admin/post-new.php?post_type=azf_submission3.4443.48

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 60 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
azh-content-settings
theysaidso_admin_options
widget_theysaidso_widget
azh-get-content-scripts
can_compress_scripts
widget_recent-posts
azh-library
widget_recent-comments
azh-all-settings

Browser metrics Passed 4 tests

A check of browser resources used by Cost Calculator by AZEXO
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲11814.46 ▲0.112.24 ▲0.7439.45 ▲2.93
Dashboard /wp-admin2,238 ▲605.61 ▼0.0291.03 ▼5.1743.17 ▲6.61
Posts /wp-admin/edit.php2,143 ▲402.04 ▲0.0538.17 ▲1.3333.86 ▲2.99
Add New Post /wp-admin/post-new.php1,558 ▲3223.52 ▲0.39663.52 ▲40.4544.72 ▼2.94
Media Library /wp-admin/upload.php1,440 ▲404.21 ▲0.0296.60 ▲0.4745.39 ▲5.62
Forms Submissions /wp-admin/edit.php?post_type=azf_submission1,1491.9732.1134.18
Add Submission /wp-admin/post-new.php?post_type=azf_submission1,9532.7351.7666.46

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • azh-content-settings
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • azh-get-content-scripts
    • azh-library
    • azh-all-settings
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cost-calculator-by-azexo/azh_forms.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cost-calculator-by-azexo/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

cost-calculator-by-azexo/azh_forms.php 85% from 13 tests

The entry point to "Cost Calculator by AZEXO" version 1.27.20 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("cost-calculator-by-azexo.php" instead of "azh_forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin5,212 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4120233,029
PO File1329342751
LESS4697617
PHP2338503
HTML1890132
JSON200119
CSS211061

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
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
19 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
azh/forms/number-i-d.png2.19KB2.11KB▼ 3.52%
azh/forms/geolocation.png4.77KB4.79KB0.00%
azh/forms/checkboxes-images.png2.03KB1.27KB▼ 37.27%
removed/total-amount.png2.97KB2.08KB▼ 29.84%
azh/forms/radio-color-fan.png0.79KB0.46KB▼ 40.99%