78% zim-airtime

Code Review | Zim Airtime

WordPress plugin Zim Airtime scored 78% from 54 tests.

About plugin

  • Plugin page: zim-airtime
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 5.8.1
  • First release: Sep 20, 2019
  • Latest release: Mar 11, 2021
  • Number of updates: 49
  • Update frequency: every 11.4 days
  • Top authors: techzim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 831 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
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼139.40ms] Passed 4 tests

This is a short check of server-side resources used by Zim Airtime
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.99 ▲0.1536.28 ▼1.05
Dashboard /wp-admin3.28 ▲0.2247.37 ▲2.28
Posts /wp-admin/edit.php3.32 ▲0.2243.55 ▲0.31
Add New Post /wp-admin/post-new.php5.57 ▲0.1489.99 ▼558.65
Media Library /wp-admin/upload.php3.16 ▲0.1534.07 ▲1.80
Zim Airtime /wp-admin/options-general.php?page=techzim-airtime-settings3.1329.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 2 new options
New WordPress options
widget_techzim_airtime_widget
techzim-airtime-use-netone-pinless

Browser metrics Passed 4 tests

A check of browser resources used by Zim Airtime
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,690 ▲9416.37 ▲0.498.94 ▼2.2452.68 ▲7.05
Dashboard /wp-admin2,976 ▲425.89 ▼0.24147.18 ▼5.4196.13 ▼10.69
Posts /wp-admin/edit.php2,748 ▲92.70 ▼0.0168.53 ▲1.0785.65 ▼0.59
Add New Post /wp-admin/post-new.php1,690 ▼2,03418.46 ▲3.27380.28 ▼86.33102.60 ▼2.78
Media Library /wp-admin/upload.php1,816 ▲95.01 ▲0.00161.42 ▲7.71118.67 ▲0.80
Zim Airtime /wp-admin/options-general.php?page=techzim-airtime-settings1,0582.3356.3065.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • widget_techzim_airtime_widget
    • techzim-airtime-use-netone-pinless

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/zim-airtime/admin/partials/techzim-airtime-admin-display.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/zim-airtime/public/partials/techzim-airtime-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/zim-airtime/public/partials/techzim-airtime-diaspora-public-order-cancelled.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/zim-airtime/public/partials/techzim-airtime-diaspora-public-order-received.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/zim-airtime/public/partials/techzim-airtime-public-order-received.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/zim-airtime/admin/class-techzim-airtime-widget.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/zim-airtime/public/partials/techzim-airtime-diaspora-public-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/zim-airtime/public/partials/techzim-airtime-public-query-received.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: e-commerce

zim-airtime/techzim-airtime.php 85% from 13 tests

"Zim Airtime" version 2.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zim-airtime.php" instead of "techzim-airtime.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,398 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP192777941,053
JavaScript56693342
CSS4043

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.78
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods56
▷ Static methods58.93%
▷ Public methods5089.29%
▷ Protected methods00.00%
▷ Private methods610.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin