84% lisette-cost-calculator

Code Review | Lisette Cost Calculator

WordPress plugin Lisette Cost Calculator scored84%from 54 tests.

About plugin

  • Plugin page: lisette-cost-calc...
  • Plugin version: 1.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Oct 20, 2017
  • Latest release: Sep 10, 2021
  • Number of updates: 29
  • Update frequency: every 49.0 days
  • Top authors: sergmoro1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /762 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.04MB] [CPU: ▼4.82ms] Passed 4 tests

A check of server-side resources used by Lisette Cost Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.13 ▼5.78
Dashboard /wp-admin3.35 ▲0.0459.54 ▲4.99
Posts /wp-admin/edit.php3.40 ▲0.0455.64 ▼2.17
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.16 ▼10.06
Media Library /wp-admin/upload.php3.27 ▲0.0437.48 ▼1.28

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_lisette_cost_calculator_sum
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Lisette Cost Calculator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.36 ▼0.579.26 ▲7.4640.42 ▼3.42
Dashboard /wp-admin2,198 ▲185.62 ▼0.0685.91 ▼3.7140.63 ▼3.03
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0541.72 ▲3.2338.68 ▲3.70
Add New Post /wp-admin/post-new.php1,526 ▼223.33 ▲0.21642.50 ▼22.2457.58 ▲3.84
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.00104.78 ▼0.2546.20 ▲1.45

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

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

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
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lisette-cost-calculator/config/questionnaire-test.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lisette-cost-calculator/views/cost_calculator_sum.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lisette-cost-calculator/Sum.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lisette-cost-calculator/Sum.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lisette-cost-calculator/config/questionnaire.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: questionnaire, calculator

lisette-cost-calculator/lisette-cost-calculator.php 92% from 13 tests

The main PHP script in "Lisette Cost Calculator" version 1.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected735 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP629136410
PO File1695152
JavaScript224186
CSS20482
Bourne Shell1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.50
▷ Minimum class complexity5.00
▷ Maximum class complexity20.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/test.png48.37KB19.18KB▼ 60.35%