84% hijri-calendar-widget

Code Review | Hijri Calendar Widget

WordPress plugin Hijri Calendar Widget scored84%from 54 tests.

About plugin

  • Plugin page: hijri-calendar-wi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 8, 2015
  • Latest release: Sep 8, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: bftech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.29ms] Passed 4 tests

An overview of server-side resources used by Hijri Calendar Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.67 ▲5.57
Dashboard /wp-admin3.31 ▲0.0151.23 ▲5.51
Posts /wp-admin/edit.php3.37 ▲0.0147.92 ▼7.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0198.15 ▼5.18
Media Library /wp-admin/upload.php3.24 ▲0.0135.40 ▼2.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_hijri_calendar_widget
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Hijri Calendar Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10913.85 ▼0.329.39 ▲7.7840.25 ▼1.20
Dashboard /wp-admin2,195 ▲155.61 ▼0.1084.52 ▼3.6039.62 ▲3.07
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0437.82 ▲4.0136.78 ▼0.13
Add New Post /wp-admin/post-new.php1,549 ▲2118.32 ▼4.96628.42 ▼55.9372.46 ▲9.30
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.0098.11 ▼11.6646.59 ▲0.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_hijri_calendar_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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)
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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hijri-calendar-widget/class.hijri-calendar-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hijri-calendar-widget/hijri-calendar-widget.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: widget, conversion, calendar, hijri, date

hijri-calendar-widget/hijri-calendar-widget.php 92% from 13 tests

The main PHP file in "Hijri Calendar Widget" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin217 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34088187
JavaScript1111230

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity5.00
▷ Maximum class complexity15.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions2
▷ Named functions2100.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 are no PNG files in this plugin