74% affieasy

Code Review | AffiEasy

WordPress plugin AffiEasy scored74%from 54 tests.

About plugin

  • Plugin page: affieasy
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2021
  • Latest release: Nov 29, 2023
  • Number of updates: 13
  • Update frequency: every 76.5 days
  • Top authors: perrinalexandre05 (69.23%)wpoduj (38.46%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,519 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼9.66ms] Passed 4 tests

This is a short check of server-side resources used by AffiEasy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2839.59 ▼3.02
Dashboard /wp-admin3.60 ▲0.2646.30 ▼17.75
Posts /wp-admin/edit.php3.65 ▲0.3046.52 ▼0.85
Add New Post /wp-admin/post-new.php6.12 ▲0.2389.28 ▼17.03
Media Library /wp-admin/upload.php3.46 ▲0.2335.05 ▲2.85
Affiliate links /wp-admin/admin.php?page=affieasy-link3.4934.93
Webshops /wp-admin/admin.php?page=affieasy-webshop3.4534.07
Tables /wp-admin/admin.php?page=affieasy-table3.4532.17

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 202 new files
Database: 3 new tables, 7 new options
New tables
wp_affieasy_webshop
wp_affieasy_link
wp_affieasy_table
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
affieasy_plugin_version

Browser metrics Passed 4 tests

AffiEasy: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.25 ▼0.091.71 ▼0.0344.01 ▲1.13
Dashboard /wp-admin2,225 ▲475.62 ▼0.0191.96 ▼11.9639.80 ▼4.34
Posts /wp-admin/edit.php2,127 ▲241.98 ▲0.0439.70 ▲3.2937.07 ▼3.17
Add New Post /wp-admin/post-new.php1,548 ▲2223.40 ▲0.27665.29 ▲43.9453.83 ▲1.25
Media Library /wp-admin/upload.php1,430 ▲304.21 ▲0.0496.85 ▼1.5543.25 ▲1.70
Affiliate links /wp-admin/admin.php?page=affieasy-link1,2252.1027.7328.98
Webshops /wp-admin/admin.php?page=affieasy-webshop9992.1328.5826.91
Tables /wp-admin/admin.php?page=affieasy-table9542.0827.9626.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 3 tables
    • wp_affieasy_table
    • wp_affieasy_webshop
    • wp_affieasy_link
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • affieasy_plugin_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/affieasy/classes/class-afes-link-list.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'affieasy\\AFES_Utils' not found in wp-content/plugins/affieasy/views/admin/edit-webshop.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aff_fs() in wp-content/plugins/affieasy/inc/free-version-message.php:1
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/affieasy/classes/class-afes-webshop-list.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'affieasy\\AFES_Utils' not found in wp-content/plugins/affieasy/views/admin/edit-links.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/affieasy/classes/class-afes-table-list.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/affieasy/classes/class-afes-link-list.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/affieasy/classes/class-afes-table-list.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'affieasy\\AFES_Utils' not found in wp-content/plugins/affieasy/views/admin/edit-table.php:9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/affieasy/classes/class-afes-webshop-list.php on line 7

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

affieasy/affieasy.php Passed 13 tests

Analyzing the main PHP file in "AffiEasy" version 1.1.4
83 characters long description:
Plugin to easily and quickly generate responsive tables and manage affiliate links.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected40,054 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1267,68516,11833,204
JavaScript121,0965015,715
CSS1814520836
PO File11426299

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity75.52
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.45
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes56
▷ Abstract classes23.57%
▷ Concrete classes5496.43%
▷ Final classes00.00%
Methods1,246
▷ Static methods19815.89%
▷ Public methods89271.59%
▷ Protected methods151.20%
▷ Private methods33927.21%
Functions101
▷ Named functions9493.07%
▷ Anonymous functions76.93%
Constants141
▷ Global constants9869.50%
▷ Class constants4330.50%
▷ Public constants43100.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
4 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/affieasy.png9.16KB5.26KB▼ 42.58%
libs/color-picker/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%