84% redeal-referral-marketing

Code Review | Redeal Plugin

WordPress plugin Redeal Plugin scored84%from 54 tests.

About plugin

  • Plugin page: redeal-referral-m...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2018
  • Latest release: Apr 30, 2019
  • Number of updates: 5
  • Update frequency: every 29.4 days
  • Top authors: redeal2015 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /711 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼13.47ms] Passed 4 tests

Server-side resources used by Redeal Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0531.13 ▼10.77
Dashboard /wp-admin3.35 ▼0.0050.82 ▼16.58
Posts /wp-admin/edit.php3.40 ▲0.0448.52 ▼2.58
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.49 ▼23.93
Media Library /wp-admin/upload.php3.27 ▲0.0439.36 ▲0.36

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Redeal Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,485 ▼27614.28 ▼0.105.37 ▲3.2916.33 ▼28.31
Dashboard /wp-admin2,214 ▲375.58 ▲0.0491.79 ▲5.5740.21 ▲0.85
Posts /wp-admin/edit.php2,116 ▲161.94 ▼0.0838.35 ▲1.9334.81 ▲0.97
Add New Post /wp-admin/post-new.php1,539 ▲1123.57 ▲0.57672.05 ▲13.6060.88 ▲3.48
Media Library /wp-admin/upload.php1,416 ▲134.10 ▼0.11116.01 ▲15.6754.77 ▲9.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redeal-referral-marketing/admin.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/redeal-referral-marketing/redeal-plugin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: woocommerce, redeal, refferal code, coupon code

redeal-referral-marketing/redeal-plugin.php 92% from 13 tests

The entry point to "Redeal Plugin" version 1.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("redeal-referral-marketing.php" instead of "redeal-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin160 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22751160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected