78% sortter-rahoituslaskuri

Code Review | Sortter Rahoituslaskuri

WordPress plugin Sortter Rahoituslaskuri scored78%from 54 tests.

About plugin

  • Plugin page: sortter-rahoitusl...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.8-6.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: May 4, 2023
  • Number of updates: 11
  • Update frequency: every 36.8 days
  • Top authors: sortter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /547 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 gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼6.73ms] Passed 4 tests

Server-side resources used by Sortter Rahoituslaskuri
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.10 ▼1.34
Dashboard /wp-admin3.44 ▲0.1447.11 ▼0.44
Posts /wp-admin/edit.php3.56 ▲0.2048.36 ▼2.61
Add New Post /wp-admin/post-new.php6.04 ▲0.1680.98 ▼22.54
Media Library /wp-admin/upload.php3.37 ▲0.1437.00 ▲1.16
Sortter Rahoituslaskuri /wp-admin/admin.php?page=sortter-laskuri3.3431.34
Settings /wp-admin/admin.php?page=sortter-laskuri-settings3.3332.20

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
sortter-laskuri_seller_code
widget_theysaidso_widget
widget_recent-comments
sortter-laskuri_default_sum
sortter-laskuri_page_id
widget_recent-posts
theysaidso_admin_options
sortter-laskuri_default_time
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Sortter Rahoituslaskuri
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲22614.42 ▲0.0416.30 ▲14.5836.96 ▼4.23
Dashboard /wp-admin2,233 ▲425.02 ▲0.11114.03 ▲3.9642.56 ▲1.10
Posts /wp-admin/edit.php2,116 ▲272.02 ▼0.0242.05 ▲0.1835.58 ▲0.96
Add New Post /wp-admin/post-new.php1,537 ▼317.71 ▼0.72665.71 ▲51.0049.36 ▼8.41
Media Library /wp-admin/upload.php1,409 ▲274.24 ▲0.0495.34 ▼7.5141.22 ▼2.30
Sortter Rahoituslaskuri /wp-admin/admin.php?page=sortter-laskuri8842.1824.2037.40
Settings /wp-admin/admin.php?page=sortter-laskuri-settings8382.0425.8126.28

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sortter-rahoituslaskuri/public/partials/sortter-laskuri-public-display.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sortter-rahoituslaskuri/public/partials/sortter-laskuri-public-form-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sortter-rahoituslaskuri/admin/partials/sortter-laskuri-admin-settings-display.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sortter-rahoituslaskuri/admin/partials/sortter-laskuri-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: rahoitus, loan, sortter, financing

sortter-rahoituslaskuri/sortter-laskuri.php 85% from 13 tests

The main PHP script in "Sortter Rahoituslaskuri" version 1.1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 182 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sortter-rahoituslaskuri.php" instead of "sortter-laskuri.php")

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 detected1,873 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP16154684630
PO File5143170523
CSS31214521
JavaScript21250124
Markdown119059
HTML18016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.78
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.91MB with 0.63MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png68.24KB20.44KB▼ 70.04%
assets/screenshot-3.png352.84KB101.48KB▼ 71.24%
assets/screenshot-2.png190.01KB53.85KB▼ 71.66%
assets/screenshot-1.png316.11KB102.77KB▼ 67.49%