83% pigeon-affiliate-button

Code Review | Pigeon Affiliate Button

WordPress plugin Pigeon Affiliate Button scored83%from 54 tests.

About plugin

  • Plugin page: pigeon-affiliate-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 24, 2020
  • Latest release: Apr 24, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: prodhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /403 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.13ms] Passed 4 tests

Analyzing server-side resources used by Pigeon Affiliate Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.67 ▼0.52
Dashboard /wp-admin3.32 ▼0.0348.99 ▼16.85
Posts /wp-admin/edit.php3.37 ▲0.0149.09 ▼0.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.46 ▼6.81
Media Library /wp-admin/upload.php3.24 ▲0.0139.02 ▲1.06

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pigeon Affiliate Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.54 ▲0.192.15 ▲0.0744.83 ▲1.08
Dashboard /wp-admin2,192 ▲125.49 ▼0.1482.03 ▼16.2541.60 ▼2.21
Posts /wp-admin/edit.php2,103 ▲61.95 ▼0.1943.64 ▲6.9236.92 ▲2.82
Add New Post /wp-admin/post-new.php1,526 ▼023.44 ▲0.46676.63 ▲17.4854.36 ▼3.22
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0199.87 ▼11.0342.69 ▼3.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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 add_action() in wp-content/plugins/pigeon-affiliate-button/pgn_affiliate_button.php:18

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 issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: The official readme.txt might help

pigeon-affiliate-button/pgn_affiliate_button.php 77% from 13 tests

"Pigeon Affiliate Button" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pigeon-affiliate-button.php" instead of "pgn_affiliate_button.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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 plugin157 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1121110
PHP1141147

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 were not PNG files found in your plugin