84% wp-anchor-tab

Code Review | WP Anchor Tab

WordPress plugin WP Anchor Tab scored84%from 54 tests.

About plugin

  • Plugin page: wp-anchor-tab
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2014
  • Latest release: Mar 4, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: farmdawgnation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /906 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.01MB] [CPU: ▼9.61ms] Passed 4 tests

This is a short check of server-side resources used by WP Anchor Tab
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.85 ▼17.81
Dashboard /wp-admin3.32 ▲0.0244.63 ▼6.87
Posts /wp-admin/edit.php3.37 ▲0.0148.62 ▲0.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.23 ▼12.88
Media Library /wp-admin/upload.php3.24 ▲0.0135.81 ▼0.87

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
wp-anchortab-load-script-url
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
wp-anchortab-tab-id
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Anchor Tab
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.22 ▼1.531.85 ▼0.1140.48 ▼4.62
Dashboard /wp-admin2,219 ▲305.86 ▲0.94111.25 ▲2.2643.05 ▲1.99
Posts /wp-admin/edit.php2,105 ▲162.04 ▲0.0039.53 ▼1.6636.52 ▲1.29
Add New Post /wp-admin/post-new.php1,555 ▲1323.13 ▲4.86662.60 ▲11.7154.32 ▲3.81
Media Library /wp-admin/upload.php1,407 ▲194.23 ▼0.02100.62 ▼8.3641.60 ▼3.10

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
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • wp-anchortab-load-script-url
    • widget_recent-comments
    • wp-anchortab-tab-id
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-anchor-tab/settings.php:17
    • > PHP Notice
      Undefined variable: settingsSaved in wp-content/plugins/wp-anchor-tab/settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-anchor-tab/wp-anchortab.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-anchor-tab === )
You can take inspiration from this readme.txt

wp-anchor-tab/wp-anchortab.php 92% from 13 tests

Analyzing the main PHP file in "WP Anchor Tab" version 1.0
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-anchor-tab.php" instead of "wp-anchortab.php")

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
Everything looks great! No dangerous files found in this plugin59 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2102557
Markdown1102

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin