83% a2z-alphabetical-archive-links

Code Review | A-2-Z Alphabetical Archive Links

WordPress plugin A-2-Z Alphabetical Archive Links scored83%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: 6.3.1
  • 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

80+ active /6,630 total downloads

Benchmarks

Plugin footprint 83% 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.04MB] [CPU: ▼1.22ms] Passed 4 tests

A check of 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.51 ▲0.0542.18 ▲1.42
Dashboard /wp-admin3.34 ▲0.0444.52 ▼6.60
Posts /wp-admin/edit.php3.45 ▲0.1047.22 ▲1.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0493.98 ▼1.46
Media Library /wp-admin/upload.php3.26 ▲0.0436.54 ▲2.54
A2Z Alphabetical Archive Links /wp-admin/options-general.php?page=a2zaal-options3.2732.96

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

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

Browser metrics Passed 4 tests

A check of browser resources used by A-2-Z Alphabetical Archive Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.184.74 ▲2.9544.86 ▼0.56
Dashboard /wp-admin2,213 ▲315.80 ▼0.1093.58 ▼7.2237.53 ▼5.44
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0039.65 ▲6.3635.66 ▲2.89
Add New Post /wp-admin/post-new.php1,517 ▼2517.53 ▼1.02640.47 ▲36.4459.13 ▲3.23
Media Library /wp-admin/upload.php1,392 ▲44.15 ▼0.0595.47 ▼3.2041.38 ▼3.34
A2Z Alphabetical Archive Links /wp-admin/options-general.php?page=a2zaal-options7872.0324.0523.93

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 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
The following issues need your attention
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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: Call to undefined function add_filter() in wp-content/plugins/a2z-alphabetical-archive-links/src/settings.php:14
    • > 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 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/rewrites.php:14
    • > 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 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 wp_nonce_field() in wp-content/plugins/a2z-alphabetical-archive-links/src/views/settings_form.php:21

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 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: You can look at the official readme.txt

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

Analyzing the main PHP file in "A-2-Z Alphabetical Archive Links" version 2.0.2
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • 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
Success! There were no dangerous files found in this plugin1,107 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11356795869
Markdown1540104
JavaScript1222586
CSS128130
JSON10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin