10% prayer-time-calender

Code Review | Prayer Time & Calender

WordPress plugin Prayer Time & Calender scored10%from 54 tests.

About plugin

  • Plugin page: prayer-time-calender
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 6, 2013
  • Latest release: May 12, 2014
  • Number of updates: 35
  • Update frequency: every 6.2 days
  • Top authors: capripio (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /4,172 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/prayer-time-calender/index.php+15
    Use of undefined constant AM_Plugin_dir - assumed 'AM_Plugin_dir' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼59.43ms] Passed 4 tests

An overview of server-side resources used by Prayer Time & Calender
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.66 ▼38.94
Dashboard /wp-admin2.05 ▼1.265.83 ▼52.49
Posts /wp-admin/edit.php2.05 ▼1.314.87 ▼48.89
Add New Post /wp-admin/post-new.php2.05 ▼3.845.36 ▼97.38
Media Library /wp-admin/upload.php2.05 ▼1.185.02 ▼31.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_ma_prayer_time_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Prayer Time & Calender
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲19113.79 ▼0.408.41 ▲6.5337.21 ▼3.72
Dashboard /wp-admin2,206 ▲185.79 ▼0.1095.63 ▼12.9735.87 ▼9.62
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0534.23 ▼2.9034.10 ▼0.82
Add New Post /wp-admin/post-new.php1,547 ▲1418.46 ▼4.61609.68 ▼41.5869.67 ▲6.51
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.04104.85 ▲8.6144.08 ▼2.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/prayer-time-calender/index.php+15
    Use of undefined constant AM_Plugin_dir - assumed 'AM_Plugin_dir' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_ma_prayer_time_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prayer-time-calender/index.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/prayer-time-calender/widget.class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: widget, prayer time, islamic calender, shortcode

prayer-time-calender/index.php 85% from 13 tests

"Prayer Time & Calender" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 153 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("prayer-time-calender.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,086 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7266243996
JavaScript25656
CSS14034

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity23.17
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods71
▷ Static methods00.00%
▷ Public methods71100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin