10% irecharge-widget

Code Review | iRecharge Widget

WordPress plugin iRecharge Widget scored10%from 54 tests.

About plugin

  • Plugin page: irecharge-widget
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Apr 20, 2015
  • Latest release: Sep 4, 2015
  • Number of updates: 40
  • Update frequency: every 3.5 days
  • Top authors: istrategytech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,599 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/irecharge-widget/iRecharge_Widget.php+46
    Declaration of WP_Widget_iRecharge::widget($args) should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.55ms] Passed 4 tests

An overview of server-side resources used by iRecharge Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.72 ▼35.33
Dashboard /wp-admin2.05 ▼1.266.16 ▼46.90
Posts /wp-admin/edit.php2.05 ▼1.316.04 ▼43.11
Add New Post /wp-admin/post-new.php2.05 ▼3.848.08 ▼92.84
Media Library /wp-admin/upload.php2.05 ▼1.185.29 ▼27.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for iRecharge Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.85 ▼0.508.15 ▲6.6239.74 ▼2.19
Dashboard /wp-admin2,199 ▲225.57 ▼0.0892.59 ▼7.5244.85 ▼3.70
Posts /wp-admin/edit.php2,113 ▲101.99 ▲0.0039.81 ▼1.1536.78 ▼4.08
Add New Post /wp-admin/post-new.php1,531 ▲523.18 ▲0.16654.65 ▼2.2058.88 ▼1.12
Media Library /wp-admin/upload.php1,407 ▲44.30 ▲0.1198.39 ▲0.5742.17 ▼6.73
iRecharge Vendor Set Widget /wp-admin/options-general.php?page=iRecharge-Vendor-Set Widget7781.9622.9824.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/irecharge-widget/iRecharge_Widget.php+46
    Declaration of WP_Widget_iRecharge::widget($args) should be compatible with WP_Widget::widget($args, $instance)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_irecharge
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: ist_irecharge_hidden in wp-content/plugins/irecharge-widget/iRecharge_Widget.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/irecharge-widget/iRecharge_Widget.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% 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
7 plugin tags: airtel, etisalat, mobile top up, irecharge, mtn...

irecharge-widget/iRecharge_Widget.php 77% from 13 tests

The main PHP file in "iRecharge Widget" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("irecharge-widget.php" instead of "iRecharge_Widget.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Description: Please don't use more than 140 characters for the plugin description (currently 454 characters long)

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
Good job! No executable or dangerous file extensions detected264 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13439118
CSS16073
JavaScript2232273

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/visafone.png2.85KB1.81KB▼ 36.48%
img/mtn.png2.05KB1.85KB▼ 9.84%
icon.png5.52KB2.74KB▼ 50.35%
img/airtel.png5.38KB3.25KB▼ 39.62%
img/logo.png5.52KB2.74KB▼ 50.35%