84% wp-hijri

Code Review | WP-Hijri

WordPress plugin WP-Hijri scored84%from 54 tests.

About plugin

  • Plugin page: wp-hijri
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: May 28, 2023
  • Number of updates: 30
  • Update frequency: every 92.8 days
  • Top authors: okfie (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

900+ active /12,750 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
Installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▲6.65ms] Passed 4 tests

Server-side resources used by WP-Hijri
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7546.10 ▲3.12
Dashboard /wp-admin4.05 ▲0.7453.60 ▲1.60
Posts /wp-admin/edit.php4.10 ▲0.7453.18 ▲10.58
Add New Post /wp-admin/post-new.php6.44 ▲0.5596.80 ▲11.87
Media Library /wp-admin/upload.php3.78 ▲0.5545.48 ▲11.28
WP-Hijri /wp-admin/options-general.php?page=settings_wp_hijri3.9035.28

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_hijri_archives
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_hijri_calendar
Hijri_Settings
widget_recent-posts

Browser metrics Passed 4 tests

WP-Hijri: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.26 ▼0.401.77 ▼0.0343.90 ▼1.61
Dashboard /wp-admin2,202 ▲255.60 ▼0.0791.51 ▼0.9238.58 ▼1.07
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0035.47 ▼1.2834.90 ▼1.75
Add New Post /wp-admin/post-new.php1,529 ▲123.36 ▲0.21658.54 ▲7.5458.98 ▼0.32
Media Library /wp-admin/upload.php1,407 ▲74.36 ▲0.11102.70 ▼2.6144.44 ▲0.04
WP-Hijri /wp-admin/options-general.php?page=settings_wp_hijri2,2202.0630.9033.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_hijri_archives
    • Hijri_Settings
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_hijri_calendar
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      include_once(): Failed opening 'THE_WP_HIJRI_PATHinclude/hijri.class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-hijri/include/hijri-widgets.php on line 2
    • > PHP Warning
      Use of undefined constant THE_WP_HIJRI_PATH - assumed 'THE_WP_HIJRI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-hijri/include/hijri-widgets.php on line 2
    • > PHP Warning
      include_once(THE_WP_HIJRI_PATHinclude/hijri.class.php): failed to open stream: No such file or directory in wp-content/plugins/wp-hijri/include/hijri-widgets.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hijri/include/hijri-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-hijri/include/admin_form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hijri/include/hijri-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-hijri/include/shortcodes.php:32

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: islamic, class_date, gregorian, date, umm al-qura...

wp-hijri/main.php 92% from 13 tests

Analyzing the main PHP file in "WP-Hijri" version 1.5.2
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-hijri.php" instead of "main.php")

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
No dangerous file extensions were detected2,454 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP62928202,215
PO File1195412239

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity59.50
▷ Minimum class complexity3.00
▷ Maximum class complexity176.00
Average method complexity6.09
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods69
▷ Static methods57.25%
▷ Public methods6289.86%
▷ Protected methods34.35%
▷ Private methods45.80%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin