10% cc-savings-calculator

Code Review | CC Savings Calculator

WordPress plugin CC Savings Calculator scored 10% from 54 tests.

About plugin

  • Plugin page: cc-savings-calcul...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2013
  • Latest release: Jul 26, 2023
  • Number of updates: 27
  • Update frequency: every 130.1 days
  • Top authors: CalculatorsCanada.ca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,396 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/cc-savings-calculator/cc-savings.php+123
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼55.01ms] Passed 4 tests

Server-side resources used by CC Savings Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.08 ▼39.65
Dashboard /wp-admin2.10 ▼1.206.73 ▼42.82
Posts /wp-admin/edit.php2.10 ▼1.265.75 ▼45.76
Add New Post /wp-admin/post-new.php2.10 ▼3.796.79 ▼91.79
Media Library /wp-admin/upload.php2.10 ▼1.135.23 ▼27.57

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_cc_savings
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CC Savings Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19214.29 ▼0.405.81 ▲3.9043.76 ▼5.07
Dashboard /wp-admin2,222 ▲315.06 ▲0.12105.77 ▲6.5339.99 ▼5.99
Posts /wp-admin/edit.php2,110 ▲212.28 ▲0.2741.36 ▲0.0835.54 ▼0.49
Add New Post /wp-admin/post-new.php1,528 ▼923.67 ▲0.42651.83 ▲56.7538.73 ▼24.90
Media Library /wp-admin/upload.php1,401 ▲104.54 ▲0.3198.37 ▼2.9443.47 ▼2.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/cc-savings-calculator/cc-savings.php+123
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_cc_savings
    • 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 shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cc-savings-calculator/cc-savings.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: interest, financial, plugin, calculator, savings...

cc-savings-calculator/cc-savings.php 92% from 13 tests

The primary PHP file in "CC Savings Calculator" version 1.1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cc-savings-calculator.php" instead of "cc-savings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected321 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23431155
JavaScript226584
CSS113082

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ 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 methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected