79% girafi

Code Review | Girafi - referral program

WordPress plugin Girafi - referral program scored 79% from 54 tests.

About plugin

  • Plugin page: girafi
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Feb 18, 2017
  • Latest release: Jun 13, 2022
  • Number of updates: 56
  • Update frequency: every 34.8 days
  • Top authors: mpiasecki (69.64%)pstrojek (32.14%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active / 3,512 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.32ms] Passed 4 tests

Analyzing server-side resources used by Girafi - referral program
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.11 ▼7.92
Dashboard /wp-admin3.32 ▲0.0147.04 ▼3.39
Posts /wp-admin/edit.php3.37 ▲0.0147.97 ▼1.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.92 ▲0.41
Media Library /wp-admin/upload.php3.24 ▲0.0136.88 ▼0.18
Girafi /wp-admin/options-general.php?page=girafi3.1830.11

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Girafi - referral program: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.011.70 ▼0.1742.65 ▲1.03
Dashboard /wp-admin2,213 ▲284.94 ▲0.04104.91 ▼5.3739.94 ▼3.71
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0241.25 ▲1.1735.87 ▼0.54
Add New Post /wp-admin/post-new.php1,522 ▼1123.24 ▲0.04608.19 ▼55.1365.08 ▲11.10
Media Library /wp-admin/upload.php1,392 ▲14.28 ▲0.0394.48 ▼3.7440.68 ▼6.07
Girafi /wp-admin/options-general.php?page=girafi8782.0128.6828.18

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=girafi
    • > Notice in wp-content/plugins/girafi/girafi.php+70
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/girafi/girafi.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: popup, contest, widget, referral candy, referral program...

girafi/girafi.php Passed 13 tests

The main file in "Girafi - referral program" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
97 characters long description:
Plugin that help you get more social media referrals, feedbacks and subscribers at the same time.

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
Good job! No executable or dangerous file extensions detected152 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1167107
SVG10145

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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