89% affiliates-ninja-forms

Code Review | Affiliates Ninja Forms

WordPress plugin Affiliates Ninja Forms scored 89% from 54 tests.

About plugin

  • Plugin page: affiliates-ninja-...
  • Plugin version: 3.2.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 2, 2017
  • Latest release: May 18, 2022
  • Number of updates: 12
  • Update frequency: every 138.2 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,668 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Affiliates Ninja Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.85 ▼9.20
Dashboard /wp-admin3.31 ▲0.0144.76 ▼4.39
Posts /wp-admin/edit.php3.36 ▲0.0045.57 ▼1.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.75 ▼10.24
Media Library /wp-admin/upload.php3.23 ▲0.0034.49 ▼3.61

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Affiliates Ninja Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.23 ▼1.151.83 ▼0.1340.83 ▼0.58
Dashboard /wp-admin2,209 ▲184.85 ▼1.04115.12 ▲10.4142.92 ▼2.20
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0041.16 ▼15.9034.76 ▼18.81
Add New Post /wp-admin/post-new.php1,533 ▼023.14 ▼0.18650.61 ▼58.0252.13 ▼4.13
Media Library /wp-admin/upload.php1,382 ▼94.25 ▲0.02101.86 ▲1.8443.74 ▼2.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7, #8, #9 in affiliates-ninja-forms/assets to your readme.txt
  • Tags: There are too many tags (21 tag instead of maximum 10)
Please take inspiration from this readme.txt

affiliates-ninja-forms/affiliates-ninja-forms.php 92% from 13 tests

"Affiliates Ninja Forms" version 3.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 319 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,017 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5973861,017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity45.50
▷ Minimum class complexity3.00
▷ Maximum class complexity87.00
Average method complexity6.74
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2374.19%
▷ Public methods2477.42%
▷ Protected methods00.00%
▷ Private methods722.58%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin