84% wp-affiliate-card

Code Review | WP Affiliate Card

WordPress plugin WP Affiliate Card scored84%from 54 tests.

About plugin

  • Plugin page: wp-affiliate-card
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2020
  • Latest release: Jul 3, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: saboten24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /390 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.34ms] Passed 4 tests

Server-side resources used by WP Affiliate Card
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.65 ▼4.35
Dashboard /wp-admin3.33 ▲0.0250.86 ▼1.30
Posts /wp-admin/edit.php3.38 ▲0.0250.06 ▼3.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.89 ▲0.01
Media Library /wp-admin/upload.php3.25 ▲0.0238.07 ▼0.28
アフィカード /wp-admin/options-general.php?page=affiliate-card3.2331.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
affiliate_card_option
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Affiliate Card
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.35 ▼0.012.00 ▲0.1641.84 ▼5.69
Dashboard /wp-admin2,205 ▲255.63 ▼0.0684.84 ▼14.1846.05 ▲1.65
Posts /wp-admin/edit.php2,110 ▲71.97 ▼0.0739.05 ▲0.9940.23 ▲3.57
Add New Post /wp-admin/post-new.php1,542 ▲1423.07 ▲0.06702.12 ▲32.2657.95 ▲9.56
Media Library /wp-admin/upload.php1,398 ▼24.22 ▲0.0098.85 ▼17.6347.07 ▼1.00
アフィカード /wp-admin/options-general.php?page=affiliate-card8902.0123.4880.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=affiliate-card
    • > Notice in wp-content/plugins/wp-affiliate-card/adminoption.php+5
    Undefined index: ac_option

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: yahoo, rakuten, amazon, yodobashi, affiliate

wp-affiliate-card/wp-affiliate-card.php Passed 13 tests

The main PHP file in "WP Affiliate Card" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
17 characters long description:
WP Affiliate Card

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin810 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1239323
CSS26631289
PHP23519198

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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 functions666.67%
▷ Anonymous functions333.33%
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
There are no PNG files in this plugin