74% simple-hijri-calendar

Code Review | Simple Hijri Calendar

WordPress plugin Simple Hijri Calendar scored74%from 54 tests.

About plugin

  • Plugin page: simple-hijri-cale...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Oct 20, 2016
  • Number of updates: 19
  • Update frequency: every 29.1 days
  • Top authors: tompradana (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,623 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.74MB] [CPU: ▼46.28ms] Passed 4 tests

This is a short check of server-side resources used by Simple Hijri Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.25 ▼0.2214.78 ▼24.21
Dashboard /wp-admin3.28 ▼0.0618.10 ▼41.37
Posts /wp-admin/edit.php3.29 ▼0.0716.52 ▼34.52
Add New Post /wp-admin/post-new.php3.28 ▼2.6016.26 ▼85.00
Media Library /wp-admin/upload.php3.28 ▲0.0617.88 ▼20.48

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_simple_hijri_calendar
widget_recent-posts

Browser metrics Passed 4 tests

Simple Hijri Calendar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲12613.43 ▼0.928.53 ▲6.9638.60 ▼1.40
Dashboard /wp-admin2,195 ▲155.63 ▼0.0283.46 ▼2.0739.01 ▼1.47
Posts /wp-admin/edit.php2,097 ▼31.99 ▼0.0234.46 ▼6.6732.16 ▼6.14
Add New Post /wp-admin/post-new.php1,526 ▼022.16 ▼0.85692.22 ▲29.3451.81 ▼6.47
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.01108.85 ▼8.0647.44 ▼4.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/simple-hijri-calendar/class/uCal.php+31
    Methods with the same name as their class will not be constructors in a future version of PHP; uCal has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_simple_hijri_calendar
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just 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/simple-hijri-calendar/simple-hijri-calendar-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

simple-hijri-calendar/simple-hijri-calendar.php Passed 13 tests

The main PHP script in "Simple Hijri Calendar" version 2.1.2 is automatically included on every request by WordPress
30 characters long description:
A simple hijri calendar widget

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
No dangerous file extensions were detected540 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP353149342
CSS1271127
PO File1151646
JavaScript15425

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity20.00
▷ Minimum class complexity11.00
▷ Maximum class complexity29.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tombol-donasi.png0.89KB0.50KB▼ 43.25%
assets/img/sore.png22.10KB9.61KB▼ 56.53%
assets/img/malam.png17.40KB11.23KB▼ 35.47%
assets/img/siang.png22.66KB10.86KB▼ 52.07%
assets/img/pagi.png22.49KB10.18KB▼ 54.76%