84% affilio-integration

Code Review | Affilio-Wp

WordPress plugin Affilio-Wp scored 84% from 54 tests.

About plugin

  • Plugin page: affilio-integration
  • Plugin version: 1.8.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Nov 2, 2022
  • Latest release: Dec 26, 2022
  • Number of updates: 31
  • Update frequency: every 1.8 days
  • Top authors: hasibnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 641 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Affilio-Wp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.27 ▼0.01
Dashboard /wp-admin3.33 ▲0.0267.03 ▲12.30
Posts /wp-admin/edit.php3.38 ▲0.0253.36 ▲2.22
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.02 ▲8.53
Media Library /wp-admin/upload.php3.25 ▲0.0242.30 ▲4.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Affilio-Wp
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3114.42 ▲1.261.91 ▼0.2147.78 ▼3.38
Dashboard /wp-admin2,221 ▲125.88 ▼0.0399.68 ▼14.8143.40 ▲0.38
Posts /wp-admin/edit.php2,106 ▲202.06 ▲0.0440.62 ▲1.9245.66 ▲12.47
Add New Post /wp-admin/post-new.php1,429 ▼8822.03 ▲4.43573.32 ▼93.1251.87 ▼3.37
Media Library /wp-admin/upload.php1,400 ▲94.20 ▼0.04100.38 ▼6.5847.12 ▲1.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/affilio-integration/client.php:340
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affilio-integration/cron.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/affilio-integration/order.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
2 plugin tags: affiliate, marketing

affilio-integration/affilio-wp.php 92% from 13 tests

The main PHP script in "Affilio-Wp" version 1.8.7 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("affilio-integration.php" instead of "affilio-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,185 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP81761371,168
Markdown18014
CSS1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.50
▷ Minimum class complexity27.00
▷ Maximum class complexity50.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2284.62%
▷ Protected methods00.00%
▷ Private methods415.38%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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