84% salat-times

Code Review | Salat Times

WordPress plugin Salat Times scored 84% from 54 tests.

About plugin

  • Plugin page: salat-times
  • Plugin version: 3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2014
  • Latest release: Mar 22, 2023
  • Number of updates: 39
  • Update frequency: every 81.2 days
  • Top authors: imran2w (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active / 22,531 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▼6.64ms] Passed 4 tests

Server-side resources used by Salat Times
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3242.16 ▼6.83
Dashboard /wp-admin3.72 ▲0.4249.64 ▼2.70
Posts /wp-admin/edit.php3.84 ▲0.4848.75 ▼0.12
Add New Post /wp-admin/post-new.php6.30 ▲0.4291.13 ▼15.69
Media Library /wp-admin/upload.php3.65 ▲0.4237.74 ▼1.33
Salat Times /wp-admin/options-general.php?page=salat_times3.6133.99

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

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/salat-times/" and "wp-content/uploads/"
    • (new file) wp-content/plugin_data/salat-times/manual_time.data
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Salat Times
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.57 ▼0.391.66 ▼0.3741.35 ▼1.22
Dashboard /wp-admin2,210 ▲224.81 ▼0.09104.41 ▼6.9938.75 ▼4.93
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0536.99 ▲0.9835.13 ▲0.97
Add New Post /wp-admin/post-new.php1,540 ▲723.24 ▼0.10729.83 ▼4.9168.36 ▲6.99
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.02114.90 ▲12.2743.96 ▼4.02
Salat Times /wp-admin/options-general.php?page=salat_times2,2971.8625.5645.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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)
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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/salat-times/uninstall.php
    • > /wp-content/plugins/salat-times/PrayTime.php
    • > /wp-content/plugins/salat-times/salat-times.php
    • > /wp-content/plugins/salat-times/salat_times_admin.php
    • > /wp-content/plugins/salat-times/uCal.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget preview (English).), #2 (Widget preview (Bengali).), #3 (Manual Time Widget preview (English).), #4 (Appearance > Widget.)
Please take inspiration from this readme.txt

salat-times/salat-times.php Passed 13 tests

The main PHP script in "Salat Times" version 3.6 is automatically included on every request by WordPress
138 characters long description:
Salat (Namaz) timetable for any location around the world, based on a variety of calculation methods currently used in muslim communities.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,330 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP52401801,330

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity24.50
▷ Minimum class complexity14.00
▷ Maximum class complexity35.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
4 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png75.26KB32.19KB▼ 57.23%
screenshot-2.png7.00KB4.95KB▼ 29.33%
screenshot-1.png5.59KB3.43KB▼ 38.73%
screenshot-4.png9.50KB6.23KB▼ 34.39%