84% giftshop-airtime

Code Review | Giftshop Airtime

WordPress plugin Giftshop Airtime scored84%from 54 tests.

About plugin

  • Plugin page: giftshop-airtime
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Feb 14, 2023
  • Latest release: Mar 28, 2023
  • Number of updates: 7
  • Update frequency: every 6.7 days
  • Top authors: giftshopke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /179 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.22ms] Passed 4 tests

A check of server-side resources used by Giftshop Airtime
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0447.79 ▲1.80
Dashboard /wp-admin3.33 ▲0.0353.10 ▼2.49
Posts /wp-admin/edit.php3.39 ▲0.0349.55 ▼0.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.40 ▼15.20
Media Library /wp-admin/upload.php3.26 ▲0.0335.93 ▼2.20

Server storage [IO: ▲0.32MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/giftshop-airtime/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/giftshop-airtime/assets/icon-128\303\227128.jpg"
    • (new file) "wp-content/plugins/giftshop-airtime/assets/icon-256\303\227256.jpg"
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Giftshop Airtime: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲2514.20 ▼0.181.63 ▼0.5742.35 ▼3.96
Dashboard /wp-admin2,214 ▲345.64 ▼0.0392.54 ▼5.7543.55 ▼9.07
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0339.31 ▼0.1634.66 ▲1.08
Add New Post /wp-admin/post-new.php1,539 ▲1323.56 ▲0.03653.26 ▲8.8149.58 ▼17.85
Media Library /wp-admin/upload.php1,419 ▲224.21 ▲0.0397.16 ▼19.7546.85 ▲1.09

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/giftshop-airtime/Giftshop-Airtime.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: buy airtime, giftshop, giftshop plugin, airtime

giftshop-airtime/Giftshop-Airtime.php 92% from 13 tests

The main PHP script in "Giftshop Airtime" version 1.0.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("giftshop-airtime.php" instead of "Giftshop-Airtime.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin304 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript18114168
PHP16430122
CSS351114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png10.91KB4.38KB▼ 59.89%
assets/screenshot-2.png16.29KB6.99KB▼ 57.09%