89% affiliates-import

Code Review | Affiliates Import

WordPress plugin Affiliates Import scored89%from 54 tests.

About plugin

  • Plugin page: affiliates-import
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Nov 9, 2017
  • Latest release: May 9, 2022
  • Number of updates: 9
  • Update frequency: every 182.4 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,959 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 gracefully, with no errors

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

An overview of server-side resources used by Affiliates Import
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.41 ▼10.58
Dashboard /wp-admin3.31 ▼0.0445.13 ▼18.50
Posts /wp-admin/edit.php3.36 ▲0.0050.00 ▲4.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.92 ▼6.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.39 ▼0.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Affiliates Import
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.25 ▼0.311.59 ▼0.2641.24 ▼2.87
Dashboard /wp-admin2,195 ▲215.62 ▲0.0388.72 ▼10.3142.43 ▼2.39
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0339.24 ▲4.0736.69 ▲4.75
Add New Post /wp-admin/post-new.php1,535 ▲918.19 ▼4.93594.29 ▼85.2974.59 ▲9.51
Media Library /wp-admin/upload.php1,397 ▲34.25 ▼0.0895.42 ▼6.4041.18 ▼3.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in affiliates-import/assets to your readme.txt
You can look at the official readme.txt

affiliates-import/affiliates-import.php 92% from 13 tests

"Affiliates Import" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 265 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin678 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP492200592
JavaScript182277
CSS10199

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity39.00
▷ Minimum class complexity3.00
▷ Maximum class complexity94.00
Average method complexity8.60
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods15100.00%
▷ Public methods1386.67%
▷ Protected methods00.00%
▷ Private methods213.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants428.57%
▷ Class constants1071.43%
▷ Public constants10100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/placeholder.png12.08KB4.35KB▼ 63.97%