84% salah-widget

Code Review | Salah Widget

WordPress plugin Salah Widget scored84%from 54 tests.

About plugin

  • Plugin page: salah-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 27, 2018
  • Latest release: May 2, 2018
  • Number of updates: 18
  • Update frequency: every 0.3 days
  • Top authors: ndelilovic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /723 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.33ms] Passed 4 tests

Server-side resources used by Salah Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.66 ▲0.56
Dashboard /wp-admin3.35 ▲0.0045.54 ▼12.97
Posts /wp-admin/edit.php3.40 ▲0.0443.17 ▼11.34
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.35 ▼8.57
Media Library /wp-admin/upload.php3.27 ▲0.0436.07 ▼0.42

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_salah_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Salah Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.35 ▼0.061.77 ▲0.2443.30 ▲2.33
Dashboard /wp-admin2,195 ▲185.63 ▼0.0680.78 ▼5.7736.89 ▼3.27
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0134.70 ▼5.1635.77 ▼2.58
Add New Post /wp-admin/post-new.php1,526 ▼223.71 ▲0.71681.31 ▲10.0361.82 ▼3.52
Media Library /wp-admin/upload.php1,394 ▼04.17 ▼0.03101.05 ▼9.9046.64 ▼0.24

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 does not fully uninstall, leaving 7 options in the database
    • widget_salah_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/salah-widget/salah-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Please fix this invalid url: "paypal.me/Delilovic"
The official readme.txt might help

salah-widget/salah-widget.php Passed 13 tests

The primary PHP file in "Salah Widget" version 1.1 is used by WordPress to initiate all plugin functionality
76 characters long description:
Adds a custom salah widget used for Muslim prayer times and Ramadan fasting.

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
Success! There were no dangerous files found in this plugin334 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14014218
CSS1220116

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin