10% suregifts

Code Review | SureGifts

WordPress plugin SureGifts scored10%from 54 tests.

About plugin

  • Plugin page: suregifts
  • Plugin version: 5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Apr 2, 2016
  • Latest release: Apr 12, 2016
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: suregifts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/suregifts/Suregiftscheckout_Plugin.php+54
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.83ms] Passed 4 tests

An overview of server-side resources used by SureGifts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1541.31 ▲1.38
Dashboard /wp-admin3.45 ▲0.1452.10 ▼3.06
Posts /wp-admin/edit.php3.57 ▲0.2146.28 ▼3.35
Add New Post /wp-admin/post-new.php6.03 ▲0.1493.11 ▼7.15
Media Library /wp-admin/upload.php3.38 ▲0.1438.98 ▼1.74
suregiftscheckout /wp-admin/plugins.php?page=Suregiftscheckout_PluginSettings3.3432.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 14 new options
New WordPress options
Suregiftscheckout_Plugin_TestMode
Suregiftscheckout_Plugin_Country
Suregiftscheckout_Plugin_PasswordInput
widget_theysaidso_widget
Suregiftscheckout_Plugin_UsernameInput
widget_recent-comments
Suregiftscheckout_Plugin_MessageInput
db_upgraded
Suregiftscheckout_Plugin__version
Suregiftscheckout_Plugin_WebsiteHostInput
...

Browser metrics Passed 4 tests

Checking browser requirements for SureGifts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.081.77 ▼0.2644.86 ▲3.00
Dashboard /wp-admin2,202 ▲225.65 ▼0.0194.26 ▲9.2644.35 ▲4.41
Posts /wp-admin/edit.php2,101 ▲12.02 ▼0.0635.04 ▼3.9934.10 ▼1.85
Add New Post /wp-admin/post-new.php1,529 ▲323.32 ▼0.23646.46 ▼30.3553.70 ▼7.05
Media Library /wp-admin/upload.php1,407 ▲74.21 ▼0.08100.77 ▼8.1043.68 ▼4.86
suregiftscheckout /wp-admin/plugins.php?page=Suregiftscheckout_PluginSettings9382.1224.2432.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 14 options
    • Suregiftscheckout_Plugin_MessageInput
    • Suregiftscheckout_Plugin_WebsiteHostInput
    • widget_theysaidso_widget
    • Suregiftscheckout_Plugin_UsernameInput
    • Suregiftscheckout_Plugin_TestMode
    • widget_recent-posts
    • theysaidso_admin_options
    • Suregiftscheckout_Plugin__version
    • Suregiftscheckout_Plugin__installed
    • db_upgraded
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/suregifts/suregiftscheckout.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
  • Tags: There were no tags found
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

suregifts/suregiftscheckout.php 85% from 13 tests

The primary PHP file in "SureGifts" version 5.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("suregifts.php" instead of "suregiftscheckout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin628 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8222471628

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods78
▷ Static methods00.00%
▷ Public methods5064.10%
▷ Protected methods2835.90%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
There are no PNG files in this plugin