84% sip-calculator

Code Review | SIP Calculator

WordPress plugin SIP Calculator scored84%from 54 tests.

About plugin

  • Plugin page: sip-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 4
  • Update frequency: every 98.3 days
  • Top authors: mgplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

A check of server-side resources used by SIP Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.76 ▼2.41
Dashboard /wp-admin3.44 ▲0.1447.89 ▼3.43
Posts /wp-admin/edit.php3.49 ▲0.1350.32 ▼1.08
Add New Post /wp-admin/post-new.php6.04 ▲0.1591.98 ▲1.90
Media Library /wp-admin/upload.php3.36 ▲0.1336.82 ▲1.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for SIP Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16714.27 ▼0.0015.48 ▲13.8436.69 ▼12.94
Dashboard /wp-admin2,236 ▲625.88 ▲0.2695.65 ▼4.9541.99 ▼2.31
Posts /wp-admin/edit.php2,143 ▲432.31 ▲0.3344.77 ▲6.6635.50 ▲1.78
Add New Post /wp-admin/post-new.php1,557 ▲3123.53 ▼0.08606.19 ▼105.5833.28 ▼27.12
Media Library /wp-admin/upload.php1,438 ▲384.50 ▲0.3096.46 ▼15.2742.40 ▼4.91

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sip-calculator/inc/sip_fronted.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sip-calculator/sip-calculator.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sip-calculator/inc/sip_backend.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Contributors: The plugin contributors field is missing
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4 in sip-calculator/assets to your readme.txt
You can take inspiration from this readme.txt

sip-calculator/sip-calculator.php Passed 13 tests

Analyzing the main PHP file in "SIP Calculator" version 1.0
61 characters long description:
This plugin allows you to Create SIP Calculator in wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin15,057 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript719627413,994
PHP33311695
CSS31232368

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin