93% a2z-alphabetical-archive-links

Code Review | A-2-Z Alphabetical Archive Links

WordPress plugin A-2-Z Alphabetical Archive Links scored 93% from 54 tests.

About plugin

  • Plugin page: a2z-alphabetical-...
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-5.0.3
  • WordPress version: 5.9.2
  • First release: May 30, 2013
  • Latest release: Jan 26, 2019
  • Number of updates: 20
  • Update frequency: every 103.4 days
  • Top authors: nvwd (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 5,844 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼290.62ms] Passed 4 tests

Analyzing server-side resources used by A-2-Z Alphabetical Archive Links
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.2493.10 ▲19.44
Dashboard /wp-admin3.62 ▲0.2136.31 ▲2.65
Posts /wp-admin/edit.php3.84 ▲0.2041.22 ▲4.35
Add New Post /wp-admin/post-new.php7.14 ▲0.1797.58 ▼1,172.09
Media Library /wp-admin/upload.php3.56 ▲0.2627.95 ▲2.60
A2Z Alphabetical Archive Links /wp-admin/options-general.php?page=a2zaal-options3.4725.42

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for A-2-Z Alphabetical Archive Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲2415.92 ▲0.757.49 ▲1.512.59 ▼0.05
Dashboard /wp-admin2,890 ▲366.16 ▼0.03132.34 ▼4.42190.22 ▼57.73
Posts /wp-admin/edit.php2,696 ▲393.23 ▼0.0065.69 ▲0.54146.95 ▲2.12
Add New Post /wp-admin/post-new.php1,776 ▲1621.25 ▼1.31489.39 ▲25.20245.84 ▲84.69
Media Library /wp-admin/upload.php1,696 ▼55.55 ▲0.03176.17 ▲38.30201.06 ▲22.06
A2Z Alphabetical Archive Links /wp-admin/options-general.php?page=a2zaal-options9922.4253.71103.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/a2z-alphabetical-archive-links/src/vender/wp-background-processing/classes/wp-background-process.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/a2z-alphabetical-archive-links/src/classes/A2ZAAL_Post_Type_Background_Process.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/a2z-alphabetical-archive-links/src/views/settings_form.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/a2z-alphabetical-archive-links/src/plugin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/a2z-alphabetical-archive-links/src/vender/wp-background-processing/wp-background-processing.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/a2z-alphabetical-archive-links/src/settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a2z-alphabetical-archive-links/src/widgets/a2zaal_widget.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/a2z-alphabetical-archive-links/src/rewrites.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed: The official readme.txt is a good inspiration

a2z-alphabetical-archive-links/a2z-alphabetical-archive-links.php 85% from 13 tests

The main PHP file in "A-2-Z Alphabetical Archive Links" ver. 2.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,107 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11356795869
Markdown1540104
JavaScript1222586
CSS128130
JSON10018

PHP code Passed 2 tests

A short 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.28
Average class complexity14.50
▷ Minimum class complexity4.00
▷ Maximum class complexity30.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes4
▷ Abstract classes250.00%
▷ Concrete classes250.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods2353.49%
▷ Protected methods2046.51%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected