84% auto-anchor

Code Review | Auto Anchor

WordPress plugin Auto Anchor scored84%from 54 tests.

About plugin

  • Plugin page: auto-anchor
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Oct 5, 2020
  • Latest release: Aug 23, 2023
  • Number of updates: 14
  • Update frequency: every 75.3 days
  • Top authors: benediktbergmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Auto Anchor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.76 ▲2.89
Dashboard /wp-admin3.31 ▲0.0049.64 ▼0.48
Posts /wp-admin/edit.php3.36 ▲0.0043.96 ▼1.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.28 ▼13.17
Media Library /wp-admin/upload.php3.23 ▲0.0037.87 ▲0.89

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Auto Anchor: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.56 ▼0.791.83 ▲0.0842.22 ▼1.06
Dashboard /wp-admin2,206 ▲174.86 ▼0.09103.33 ▼5.0740.67 ▼2.97
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0435.13 ▼0.3331.88 ▼0.05
Add New Post /wp-admin/post-new.php1,514 ▼1917.66 ▼5.31690.37 ▲15.1857.03 ▲8.98
Media Library /wp-admin/upload.php1,391 ▲94.26 ▲0.0894.51 ▼4.2441.89 ▼1.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/auto-anchor/auto-anchor.php:79

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
3 plugin tags: headers, auto, anchor

auto-anchor/auto-anchor.php 92% from 13 tests

The entry point to "Auto Anchor" version 1.2.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected92 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1221466
CSS12126

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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