74% affilipus-filter-links-to-unpublished-content

Code Review | Affilipus: Filter Broken Links

WordPress plugin Affilipus: Filter Broken Links scored74%from 54 tests.

About plugin

  • Plugin page: affilipus-filter-...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Feb 21, 2017
  • Number of updates: 22
  • Update frequency: every 1.4 days
  • Top authors: Zaglov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,225 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼10.35ms] Passed 4 tests

Server-side resources used by Affilipus: Filter Broken Links
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0740.51 ▼7.87
Dashboard /wp-admin3.39 ▲0.0052.77 ▼18.39
Posts /wp-admin/edit.php3.51 ▲0.1152.10 ▼0.96
Add New Post /wp-admin/post-new.php5.97 ▲0.0489.65 ▼14.17
Media Library /wp-admin/upload.php3.32 ▲0.0438.47 ▲2.05

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_affilipus_linkfilter
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
affilipus_linkfilter_version

Browser metrics Passed 4 tests

An overview of browser requirements for Affilipus: Filter Broken Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.011.69 ▼0.0640.07 ▼2.93
Dashboard /wp-admin2,195 ▲185.60 ▼0.0483.98 ▼13.5340.34 ▼2.62
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0940.93 ▲5.1736.74 ▲0.35
Add New Post /wp-admin/post-new.php1,526 ▼223.19 ▲0.16678.25 ▼7.1951.84 ▲0.16
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.08101.63 ▼4.2744.33 ▼0.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_affilipus_linkfilter
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • affilipus_linkfilter_version
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/affilipus-filter-links-to-unpublished-content/affilipus-linkfilter.php:13

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: affilipus, filter

affilipus-filter-links-to-unpublished-content/affilipus-linkfilter.php 85% from 13 tests

The main PHP script in "Affilipus: Filter Broken Links" version 1.1.7 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("affilipus-filter-links-to-unpublished-content.php" instead of "affilipus-linkfilter.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected236 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP822739230
JSON1006

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin