78% penanggalan-hijriyah-masehi

Code Review | Penanggalan Hijriyah & Masehi

WordPress plugin Penanggalan Hijriyah & Masehi scored78%from 54 tests.

About plugin

  • Plugin page: penanggalan-hijri...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 30, 2014
  • Latest release: Oct 31, 2014
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: darto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.14ms] Passed 4 tests

An overview of server-side resources used by Penanggalan Hijriyah & Masehi
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.39 ▼1.34
Dashboard /wp-admin3.36 ▲0.0547.71 ▼5.67
Posts /wp-admin/edit.php3.41 ▲0.0548.54 ▼5.48
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.86 ▼8.07
Media Library /wp-admin/upload.php3.28 ▲0.0537.27 ▲1.32

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_phm_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Penanggalan Hijriyah & Masehi
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.55 ▼0.822.05 ▲0.2843.99 ▲4.39
Dashboard /wp-admin2,215 ▲245.90 ▼0.00111.80 ▲8.5941.42 ▼0.02
Posts /wp-admin/edit.php2,095 ▲32.05 ▼0.0040.65 ▲0.3034.98 ▼1.86
Add New Post /wp-admin/post-new.php1,538 ▲523.13 ▼0.05587.36 ▼90.6848.55 ▼6.12
Media Library /wp-admin/upload.php1,394 ▲64.22 ▲0.05101.87 ▼10.9642.56 ▼4.86
Hijri & Gregorian Dates /wp-admin/tanggalan.php260.440.0815.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_phm_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/penanggalan-hijriyah-masehi/tanggalan.php:249

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/tanggalan.php
    • > Network (severe)
    wp-admin/tanggalan.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: hijr, widget, masehi, arab, penanggalan...

penanggalan-hijriyah-masehi/tanggalan.php 92% from 13 tests

"Penanggalan Hijriyah & Masehi" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("penanggalan-hijriyah-masehi.php" instead of "tanggalan.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected227 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16255227

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions6
▷ Named functions6100.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
No PNG images were found in this plugin