72% cashback

Code Review | Cashback

WordPress plugin Cashback scored72%from 54 tests.

About plugin

  • Plugin page: cashback
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jun 2, 2017
  • Latest release: Jun 2, 2017
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: hotshopper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.36ms] Passed 4 tests

An overview of server-side resources used by Cashback
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.88 ▼6.23
Dashboard /wp-admin3.36 ▲0.0251.55 ▼12.22
Posts /wp-admin/edit.php3.48 ▲0.1260.15 ▲8.12
Add New Post /wp-admin/post-new.php5.95 ▲0.07359.51 ▲251.34
Media Library /wp-admin/upload.php3.26 ▲0.0440.55 ▲4.90
Login /wp-admin/admin.php?page=c247-login3.2639.16
RefreshStatistics /wp-admin/admin.php?page=c247-statistics-refresh3.12212.10
Register /wp-admin/admin.php?page=c247-register3.2634.33
Setup /wp-admin/admin.php?page=c247-setup3.2333.63

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: 2 new tables, 22 new options
New tables
wp_c247_keywords
wp_c247_statistics
New WordPress options
theysaidso_admin_options
c247_registered
widget_theysaidso_widget
c247_profile_gender
db_upgraded
c247_site_title
recovery_mode_email_last_sent
c247_show_offers
c247_db_ver
widget_recent-posts
...

Browser metrics Passed 4 tests

Cashback: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,025 ▲25414.85 ▲0.475.54 ▲3.6143.39 ▲0.39
Dashboard /wp-admin2,345 ▲1646.15 ▲0.42114.26 ▲7.4839.10 ▼2.07
Posts /wp-admin/edit.php2,287 ▲1843.36 ▲1.3054.87 ▲14.8136.12 ▲2.24
Add New Post /wp-admin/post-new.php1,555 ▲2923.44 ▲5.94666.53 ▼46.5437.23 ▼15.66
Media Library /wp-admin/upload.php1,431 ▲374.20 ▼0.1880.76 ▼19.2846.35 ▲3.58
Login /wp-admin/admin.php?page=c247-login1,0243.1642.0352.69
RefreshStatistics /wp-admin/admin.php?page=c247-statistics-refresh280.440.076.35
Register /wp-admin/admin.php?page=c247-register1,0813.0741.8262.49
Setup /wp-admin/admin.php?page=c247-setup7091.7011.0920.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • c247_show_offers
    • theysaidso_admin_options
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=c247-setup
    • > Error in wp-content/plugins/cashback/includes/CashBackAdminPanel.php+87
    Uncaught Error: Call to undefined function get_current_site() in wp-content/plugins/cashback/includes/CashBackAdminPanel.php:87
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): CashBackAdminPanel::AdminSetupBox()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/cashback/includes/CashBackStatistics.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=c247-statistics-refresh
    • > Network (severe)
    wp-admin/admin.php?page=c247-statistics - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI ("~")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

cashback/cashback.php 92% from 13 tests

"Cashback" version 1.1.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:
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,537 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP111961861,501
CSS13019
JavaScript10017

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.75
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods61
▷ Static methods3252.46%
▷ Public methods5081.97%
▷ Protected methods00.00%
▷ Private methods1118.03%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin