10% zakaat-calculator

Code Review | Zakaat Calculator

WordPress plugin Zakaat Calculator scored10%from 54 tests.

About plugin

  • Plugin page: zakaat-calculator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Apr 4, 2013
  • Latest release: Jul 24, 2014
  • Number of updates: 7
  • Update frequency: every 229.0 days
  • Top authors: haseebayazi (57.14%)haseebahmadayazi (57.14%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,611 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/zakaat-calculator/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; ZakaatCalculator has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.09ms] Passed 4 tests

An overview of server-side resources used by Zakaat Calculator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.93 ▼39.61
Dashboard /wp-admin2.09 ▼1.216.42 ▼41.24
Posts /wp-admin/edit.php2.10 ▼1.265.35 ▼42.88
Add New Post /wp-admin/post-new.php2.09 ▼3.805.98 ▼100.63
Media Library /wp-admin/upload.php2.10 ▼1.145.96 ▼34.81

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/zakaat-calculator/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_zakaatcalculator
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zakaat Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.26 ▼1.111.66 ▼0.2737.59 ▼3.19
Dashboard /wp-admin2,224 ▲185.86 ▲0.97110.52 ▲8.6844.05 ▲1.81
Posts /wp-admin/edit.php2,097 ▼02.02 ▼0.1233.15 ▼3.5734.55 ▲0.62
Add New Post /wp-admin/post-new.php1,545 ▲1921.05 ▲3.47741.44 ▲56.7871.65 ▲15.51
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.01111.00 ▲0.0646.60 ▼1.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/zakaat-calculator/index.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; ZakaatCalculator has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_zakaatcalculator
    • widget_theysaidso_widget

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 | 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zakaat-calculator/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: calculator, voice of muslim ummah, islam, islamic

zakaat-calculator/index.php 92% from 13 tests

The primary PHP file in "Zakaat Calculator" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zakaat-calculator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected160 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1269160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected