10% affiliates-crc

Code Review | Affiliates-CRC

WordPress plugin Affiliates-CRC scored 10% from 54 tests.

About plugin

  • Plugin page: affiliates-crc
  • Plugin version: 0.9beta...
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 7, 2013
  • Latest release: Jan 12, 2013
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: farhansabir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 826 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/affiliates-crc/index.php+16
    Use of undefined constant AFFILIATES_CRC_PATH - assumed 'AFFILIATES_CRC_PATH' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼56.14ms] Passed 4 tests

Analyzing server-side resources used by Affiliates-CRC
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.74 ▼43.32
Dashboard /wp-admin2.08 ▼1.235.65 ▼43.02
Posts /wp-admin/edit.php2.08 ▼1.285.84 ▼43.10
Add New Post /wp-admin/post-new.php2.08 ▼3.815.65 ▼95.13
Media Library /wp-admin/upload.php2.08 ▼1.155.47 ▼29.30
Apply Coupon Credit /wp-admin/admin.php?page=affiliates-crc-022.085.59
Import Coupon Orders /wp-admin/admin.php?page=affiliates-crc-012.086.19
Affiliates ReCalc /wp-admin/admin.php?page=affiliates-crc/index.php2.085.82

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Affiliates-CRC
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.23 ▼1.131.58 ▼0.2543.35 ▼3.34
Dashboard /wp-admin2,226 ▲415.86 ▼0.1999.61 ▼8.2485.89 ▲38.37
Posts /wp-admin/edit.php2,125 ▲331.99 ▼0.0636.87 ▼4.3333.37 ▼4.76
Add New Post /wp-admin/post-new.php1,697 ▲18322.08 ▲4.58678.08 ▲47.4053.41 ▼12.90
Media Library /wp-admin/upload.php1,424 ▲424.21 ▼0.02103.30 ▲4.4370.48 ▲24.30
Apply Coupon Credit /wp-admin/admin.php?page=affiliates-crc-027041.146.4221.51
Import Coupon Orders /wp-admin/admin.php?page=affiliates-crc-018112.0224.8028.16
Affiliates ReCalc /wp-admin/admin.php?page=affiliates-crc/index.php8012.0126.9923.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/affiliates-crc/index.php+16
    Use of undefined constant AFFILIATES_CRC_PATH - assumed 'AFFILIATES_CRC_PATH' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=affiliates-crc/index.php
    • > Warning in wp-content/plugins/affiliates-crc/index.php+16
    Use of undefined constant AFFILIATES_CRC_PATH - assumed 'AFFILIATES_CRC_PATH' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=affiliates-crc/index.php
    • > Warning in wp-content/plugins/affiliates-crc/index.php+16
    include(AFFILIATES_CRC_PATHaffiliates_crc_functions.php): failed to open stream: No such file or directory
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=affiliates-crc/index.php
    • > Warning in wp-content/plugins/affiliates-crc/index.php+16
    include(): Failed opening 'AFFILIATES_CRC_PATHaffiliates_crc_functions.php' for inclusion (include_path='.:/usr/share/php')

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/affiliates-crc/index.php:18
    • > PHP Warning
      include(AFFILIATES_CRC_PATHaffiliates_crc_functions.php): failed to open stream: No such file or directory in wp-content/plugins/affiliates-crc/index.php on line 16
    • > PHP Warning
      Use of undefined constant AFFILIATES_CRC_PATH - assumed 'AFFILIATES_CRC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/affiliates-crc/index.php on line 16
    • > PHP Warning
      include(): Failed opening 'AFFILIATES_CRC_PATHaffiliates_crc_functions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/affiliates-crc/index.php on line 16

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=affiliates-crc/index.php
    • > Network (severe)
    http://affiliates_crc_cb/ - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 87% 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:
  • Tested up to: The plugin version is formatted incorrectly
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

affiliates-crc/index.php 85% from 13 tests

The main PHP script in "Affiliates-CRC" version 0.9beta... is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("affiliates-crc.php" instead of "index.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "0.9beta...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin354 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP63281354

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin