74% emi-calc

Code Review | Emi_Calc

WordPress plugin Emi_Calc scored74%from 54 tests.

About plugin

  • Plugin page: emi-calc
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 18, 2015
  • Latest release: Jul 18, 2015
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: Rqubes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,273 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.72ms] Passed 4 tests

Server-side resources used by Emi_Calc
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.90 ▼11.25
Dashboard /wp-admin3.34 ▼0.0149.83 ▼10.47
Posts /wp-admin/edit.php3.39 ▲0.0344.39 ▼5.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.61 ▼11.34
Media Library /wp-admin/upload.php3.26 ▲0.0333.25 ▼2.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_bank_details
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Emi_Calc
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.40 ▲0.031.83 ▼0.4244.56 ▼1.68
Dashboard /wp-admin2,222 ▲344.85 ▼0.04107.17 ▼1.7644.12 ▼0.77
Posts /wp-admin/edit.php2,105 ▲132.03 ▲0.0633.52 ▼7.9032.74 ▼4.23
Add New Post /wp-admin/post-new.php1,528 ▼517.51 ▼5.83662.22 ▼23.8951.98 ▼2.31
Media Library /wp-admin/upload.php1,407 ▲224.22 ▼0.0397.00 ▼8.8641.50 ▼4.98

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_bank_details
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/emi-calc/emi_calculator.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Documentation file has screen shot attached in it with full manual to help you.) image required
The official readme.txt might help

emi-calc/emi_calculator.php 92% from 13 tests

The main PHP script in "Emi_Calc" 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 ("emi-calc.php" instead of "emi_calculator.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
Good job! No executable or dangerous file extensions detected450 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP1515207
CSS370140
JavaScript2102103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/Delete.png11.77KB4.15KB▼ 64.71%