73% gyta-buyback

Code Review | Gyta BuyBack

WordPress plugin Gyta BuyBack scored73%from 54 tests.

About plugin

  • Plugin page: gyta-buyback
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 14, 2021
  • Latest release: Sep 5, 2023
  • Number of updates: 30
  • Update frequency: every 32.2 days
  • Top authors: mberding (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,701 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲1.85ms] Passed 4 tests

Server-side resources used by Gyta BuyBack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5945.98 ▲2.49
Dashboard /wp-admin3.91 ▲0.6053.78 ▲4.56
Posts /wp-admin/edit.php3.96 ▲0.6057.07 ▲4.95
Add New Post /wp-admin/post-new.php6.42 ▲0.5492.58 ▼4.59
Media Library /wp-admin/upload.php3.66 ▲0.4343.60 ▲9.01
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.0342.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 196 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
fs_accounts
can_compress_scripts
widget_recent-posts
fs_debug_mode
fs_active_plugins
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Gyta BuyBack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.25 ▼1.381.67 ▼0.2730.68 ▼13.66
Dashboard /wp-admin2,240 ▲494.85 ▼0.99106.19 ▲2.3641.10 ▼0.41
Posts /wp-admin/edit.php2,126 ▲342.01 ▼0.0241.07 ▲2.4338.19 ▼0.58
Add New Post /wp-admin/post-new.php1,532 ▼1023.15 ▲2.35667.28 ▲18.1461.27 ▲11.12
Media Library /wp-admin/upload.php1,422 ▲344.09 ▼0.1196.53 ▼13.4343.88 ▼1.30
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0941.7125.9729.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/gyta-buyback/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gyta-buyback/admin/dashboard.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

gyta-buyback/gyta-buyback.php 85% from 13 tests

Analyzing the main PHP file in "Gyta BuyBack" version 1.3.0
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.8")
  • Description: Keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin34,744 lines of code in 146 files:
LanguageFilesBlank linesComment linesLines of code
PHP1298,18817,61734,521
JavaScript33459194
XML13016
CSS130013

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity84.15
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,281
▷ Static methods20516.00%
▷ Public methods89169.56%
▷ Protected methods171.33%
▷ Private methods37329.12%
Functions126
▷ Named functions126100.00%
▷ Anonymous functions00.00%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 2.19MB with 1.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png714.51KB297.21KB▼ 58.40%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
screenshot-2.png731.19KB322.29KB▼ 55.92%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
images/Gyta-Buyback-Logo-2.png8.64KB4.42KB▼ 48.80%