10% malaysia-prayer-times

Code Review | Malaysia Prayer Times

WordPress plugin Malaysia Prayer Times scored 10% from 54 tests.

About plugin

  • Plugin page: malaysia-prayer-t...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Apr 8, 2014
  • Number of updates: 11
  • Update frequency: every 5.9 days
  • Top authors: envigeek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,601 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
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/malaysia-prayer-times/malaysia-prayer-times.php+196
    Methods with the same name as their class will not be constructors in a future version of PHP; MPT_Widget_All has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼45.33ms] Passed 4 tests

An overview of server-side resources used by Malaysia Prayer Times
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.15 ▼29.50
Dashboard /wp-admin2.30 ▼1.0111.01 ▼35.75
Posts /wp-admin/edit.php2.30 ▼1.0611.68 ▼38.09
Add New Post /wp-admin/post-new.php2.30 ▼3.5910.02 ▼77.98
Media Library /wp-admin/upload.php2.30 ▼0.9310.37 ▼26.22

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_mpt-widget-all
widget_mpt-widget-now

Browser metrics Passed 4 tests

This is an overview of browser requirements for Malaysia Prayer Times
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲9413.73 ▲0.445.55 ▲1.1040.56 ▼1.19
Dashboard /wp-admin2,206 ▼05.91 ▲0.0397.57 ▲4.0138.91 ▼0.16
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0340.66 ▼0.6836.55 ▼1.20
Add New Post /wp-admin/post-new.php1,533 ▼123.03 ▲0.05702.94 ▲14.9651.79 ▼10.03
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0395.05 ▼10.0140.59 ▼7.01

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
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in MPT_Widget_Now is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_mpt-widget-now
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_mpt-widget-all

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/malaysia-prayer-times/malaysia-prayer-times.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: solah, malaysia, solat, shalat, prayer...

malaysia-prayer-times/malaysia-prayer-times.php Passed 13 tests

The main PHP file in "Malaysia Prayer Times" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Widget that shows current or all prayer times for locations in Malaysia. Data by JAKIM.

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
Success! There were no dangerous files found in this plugin1,174 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS111219515
PHP23734490
JavaScript24129169

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/select2.png0.60KB0.99KB0.00%
img/select2x2.png0.83KB0.77KB▼ 6.15%