84% affiliates-captcha

Code Review | Affiliates Captcha

WordPress plugin Affiliates Captcha scored84%from 54 tests.

About plugin

  • Plugin page: affiliates-captcha
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Nov 23, 2017
  • Number of updates: 9
  • Update frequency: every 85.8 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,055 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Affiliates Captcha
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.22 ▼1.41
Dashboard /wp-admin3.32 ▲0.0147.78 ▼6.33
Posts /wp-admin/edit.php3.37 ▲0.0149.13 ▼0.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.99 ▼10.94
Media Library /wp-admin/upload.php3.24 ▲0.0138.74 ▲2.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Affiliates Captcha
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▲0.061.70 ▼0.4144.77 ▼3.45
Dashboard /wp-admin2,195 ▲155.59 ▼0.1084.20 ▼19.9039.67 ▼3.30
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0048.41 ▲12.0035.71 ▼1.57
Add New Post /wp-admin/post-new.php1,526 ▼023.03 ▲0.11664.49 ▼18.1556.29 ▼10.06
Media Library /wp-admin/upload.php1,403 ▲34.17 ▲0.0297.69 ▼9.3843.45 ▼2.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliates-captcha/affiliates-captcha.php:96

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: affiliates, affiliate marketing, captcha, referral, growth marketing...

affiliates-captcha/affiliates-captcha.php Passed 13 tests

The principal PHP file in "Affiliates Captcha" v. 1.0.1 is loaded by WordPress automatically on each request
44 characters long description:
Affiliates registration Captcha integration.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected42 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1114342

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected