83% zakah-calculator

Code Review | Zakah Calculator

WordPress plugin Zakah Calculator scored 83% from 54 tests.

About plugin

  • Plugin page: zakah-calculator
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Oct 2, 2022
  • Number of updates: 15
  • Update frequency: every 152.5 days
  • Top authors: edckwt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,830 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.01MB] [CPU: ▼2.83ms] Passed 4 tests

This is a short check of server-side resources used by Zakah Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.30 ▼13.79
Dashboard /wp-admin3.31 ▲0.0144.93 ▼1.95
Posts /wp-admin/edit.php3.36 ▲0.0148.39 ▲2.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.66 ▲3.53
Media Library /wp-admin/upload.php3.24 ▲0.0133.86 ▲1.65

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_zakah_calculator_widget

Browser metrics Passed 4 tests

Zakah Calculator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.16 ▼1.501.89 ▲0.0742.04 ▼1.16
Dashboard /wp-admin2,209 ▲244.85 ▼0.0796.65 ▼6.8840.26 ▼3.87
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0139.27 ▲3.3735.36 ▲0.31
Add New Post /wp-admin/post-new.php1,542 ▲2318.27 ▼4.75602.02 ▲5.0457.01 ▲0.88
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0494.80 ▼4.4045.57 ▲2.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_zakah_calculator_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zakah-calculator/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Zakah Calculator in widget page.), #2 (Setting.), #3 (View on your site.)
You can look at the official readme.txt

zakah-calculator/index.php 85% from 13 tests

The main PHP script in "Zakah Calculator" version 1.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zakah-calculator.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)

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
Success! There were no dangerous files found in this plugin174 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1228118
JavaScript17051
CSS1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.19KB9.65KB▼ 52.22%
screenshot-2.png14.63KB6.25KB▼ 57.24%
screenshot-3.png7.03KB3.45KB▼ 50.99%