84% os-emi-calculator

Code Review | EMI Calculator

WordPress plugin EMI Calculator scored84%from 54 tests.

About plugin

  • Plugin page: os-emi-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.5-3.8
  • WordPress version: 6.3.1
  • First release: Feb 21, 2014
  • Latest release: Feb 28, 2014
  • Number of updates: 7
  • Update frequency: every 2.0 days
  • Top authors: vkt005 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /6,351 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.34ms] Passed 4 tests

Server-side resources used by EMI Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.25 ▼3.70
Dashboard /wp-admin3.31 ▼0.0346.84 ▼15.10
Posts /wp-admin/edit.php3.36 ▲0.0048.11 ▲4.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.62 ▼10.45
Media Library /wp-admin/upload.php3.23 ▲0.0032.96 ▼0.12
Emi Calculator /wp-admin/options-general.php?page=emi-help3.2229.08

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for EMI Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.62 ▼0.751.72 ▼0.0341.25 ▼4.65
Dashboard /wp-admin2,207 ▲195.83 ▲0.9996.98 ▼17.8738.56 ▼7.40
Posts /wp-admin/edit.php2,096 ▲102.00 ▼0.0039.78 ▲2.5436.09 ▲0.26
Add New Post /wp-admin/post-new.php1,517 ▼1217.73 ▼0.71652.22 ▲12.0252.91 ▲7.77
Media Library /wp-admin/upload.php1,386 ▼24.18 ▼0.0095.84 ▼4.3541.48 ▼2.08
Emi Calculator /wp-admin/options-general.php?page=emi-help7802.0324.8026.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
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 _e() in wp-content/plugins/os-emi-calculator/emi-help.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/os-emi-calculator/emicalculator.php:29

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === os-emi-calculator === )
You can take inspiration from this readme.txt

os-emi-calculator/emicalculator.php 92% from 13 tests

The main PHP script in "EMI Calculator" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("os-emi-calculator.php" instead of "emicalculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,290 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS236491,134
JavaScript104107
PHP252449

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin