10% gift-certificate-creator

Code Review | Gift Certificate Creator

WordPress plugin Gift Certificate Creator scored10%from 54 tests.

About plugin

  • Plugin page: gift-certificate-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.0
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: May 18, 2020
  • Number of updates: 23
  • Update frequency: every 80.9 days
  • Top authors: bobcares_plugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,325 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/gift-certificate-creator/gcm-config.php+20
    Trying to access array offset on value of type bool

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

A check of server-side resources used by Gift Certificate Creator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.94 ▼33.24
Dashboard /wp-admin2.05 ▼1.265.99 ▼45.92
Posts /wp-admin/edit.php2.05 ▼1.316.13 ▼46.72
Add New Post /wp-admin/post-new.php2.05 ▼3.846.67 ▼102.71
Media Library /wp-admin/upload.php2.05 ▼1.185.53 ▼30.42
Gift Certificate Details /wp-admin/admin.php?page=gc_list_page2.056.23
Settings /wp-admin/admin.php?page=gc_settings2.057.21

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: 1 new table, 6 new options
New tables
wp_gift_certificates
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Gift Certificate Creator: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.30 ▼0.051.62 ▼0.0442.24 ▲0.21
Dashboard /wp-admin2,218 ▲405.62 ▼0.0292.96 ▼15.2437.98 ▼2.66
Posts /wp-admin/edit.php2,123 ▲231.96 ▼0.1840.62 ▲3.8035.30 ▼1.05
Add New Post /wp-admin/post-new.php1,547 ▲2123.00 ▼0.70679.54 ▲23.6759.59 ▲2.94
Media Library /wp-admin/upload.php1,426 ▲264.22 ▲0.0296.84 ▼9.2543.73 ▼3.51
Gift Certificate Details /wp-admin/admin.php?page=gc_list_page9882.0124.5227.46
Settings /wp-admin/admin.php?page=gc_settings8222.0328.2327.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/gift-certificate-creator/gcm-config.php+20
    Trying to access array offset on value of type bool
  • Zombie tables detected upon uninstall: 1 table
    • wp_gift_certificates
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=gc_settings
    • > Notice in wp-content/plugins/gift-certificate-creator/gcm-config.php+20
    Trying to access array offset on value of type bool

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: gift, gift certificate, gift certificate creator

gift-certificate-creator/giftcertificates.php 92% from 13 tests

"Gift Certificate Creator" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gift-certificate-creator.php" instead of "giftcertificates.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 plugin516 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP597235516

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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