68% avoid-linkback-abuse

Code Review | Avoid Linkback Abuse (ALA)

WordPress plugin Avoid Linkback Abuse (ALA) scored68%from 54 tests.

About plugin

  • Plugin page: avoid-linkback-abuse
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 9, 2013
  • Latest release: Dec 17, 2014
  • Number of updates: 7
  • Update frequency: every 53.7 days
  • Top authors: mandsconsulting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /992 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼35.79ms] Passed 4 tests

An overview of server-side resources used by Avoid Linkback Abuse (ALA)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.22 ▼8.86
Dashboard /wp-admin3.05 ▼0.2929.62 ▼32.19
Posts /wp-admin/edit.php3.05 ▼0.3029.40 ▼20.64
Add New Post /wp-admin/post-new.php3.05 ▼2.8428.18 ▼81.45
Media Library /wp-admin/upload.php3.05 ▼0.1836.50 ▼0.71

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Avoid Linkback Abuse (ALA)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲2813.72 ▼0.664.43 ▲2.2041.94 ▼2.48
Dashboard /wp-admin2,205 ▲235.88 ▲1.02105.63 ▲2.3441.69 ▼3.65
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0140.26 ▼0.3234.04 ▼0.60
Add New Post /wp-admin/post-new.php1,528 ▼023.40 ▲5.27671.14 ▲17.7956.34 ▲8.51
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0597.63 ▼13.1640.25 ▼1.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/avoid-linkback-abuse/ala.php+56
    Undefined offset: 0
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/avoid-linkback-abuse/main_settings.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avoid-linkback-abuse/ala.php:23
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/avoid-linkback-abuse/ala_mode.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/avoid-linkback-abuse/ala_mode.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/avoid-linkback-abuse/ala_mode.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'ALA_Settings' not found in wp-content/plugins/avoid-linkback-abuse/ala_mode.php:6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/avoid-linkback-abuse/ala_mode.php on line 5
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/avoid-linkback-abuse/ala_mode.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/avoid-linkback-abuse/ala_mode.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === avoid-linkback-abuse === )
  • Donate link: Invalid URI found ("mandsconsulting.com")
The official readme.txt is a good inspiration

avoid-linkback-abuse/ala.php 92% from 13 tests

"Avoid Linkback Abuse (ALA)" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("avoid-linkback-abuse.php" instead of "ala.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin175 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33140175

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.33
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods21
▷ Static methods733.33%
▷ Public methods1466.67%
▷ Protected methods419.05%
▷ Private methods314.29%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin